Fix crashing in the Ruby reject method in the STL wrappers

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-06-21 20:45:32 +00:00
commit 67f5931952

View file

@ -691,10 +691,12 @@ namespace swig
for ( ; i != e; )
{
VALUE r = swig::from< Sequence::value_type >(*i);
if ( RTEST( rb_yield(r) ) )
if ( RTEST( rb_yield(r) ) ) {
$self->erase(i++);
else
e = self->end();
} else {
++i;
}
}
return self;