Issue #1749 has been updated by Run Paint Run Run.


> I think 1.9.2 behaviour is no problem.
>
> String#sub matches a regexp just once.
> There is no reason to set $~ at last.
> 
> String#gsub matches a regexp repeatedly until it doesn't match.
> It set the last match after match failure for later use.

I don't understand why the change was made, but if you're saying it's intentional then I suppose we can close this ticket. I'll update the specs to indicate that this is a version-specific difference.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1749

----------------------------------------
http://redmine.ruby-lang.org