From: <wsf...@us...> - 2008-06-21 20:45:35
|
Revision: 10543 http://swig.svn.sourceforge.net/swig/?rev=10543&view=rev Author: wsfulton Date: 2008-06-21 13:45:32 -0700 (Sat, 21 Jun 2008) Log Message: ----------- Fix crashing in the Ruby reject method in the STL wrappers Modified Paths: -------------- trunk/Lib/ruby/rubycontainer.swg Modified: trunk/Lib/ruby/rubycontainer.swg =================================================================== --- trunk/Lib/ruby/rubycontainer.swg 2008-06-21 19:07:51 UTC (rev 10542) +++ trunk/Lib/ruby/rubycontainer.swg 2008-06-21 20:45:32 UTC (rev 10543) @@ -691,10 +691,12 @@ 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |