sstephenson/prototype — pull request #27 by rlineweaver (2011-10-31 14:05:48+00:00)
Title: avoiding infinite loop in String#gsub when there is a zero length match

If you issue a sub() or a gsub() using a pattern that will generate a zero-length match, prototype will get locked in an infinite loop. See tests for example patterns that trigger this behavior.