[Ironruby-core] Code Review: StringGsubWithStringPatternAndBlock
dremy at microsoft.com
Thu Jul 3 20:26:44 EDT 2008
tfpt review "/shelveset:StringGsubWithStringPatternAndBlock;REDMOND\dremy"
This change fixes the rest of the gsub coverage minus one (String#gsub with pattern and block raises a RuntimeError if the string is modified while substituting). We had a similar issue implementing squeeze so it looks like we will have to track inflight changes to the underlying string (frozen already does this, I wonder if there is some variant we can use).
This changes fixes the following specs:
String#gsub with pattern and block sets $~ for access from the block
String#gsub with pattern and block restores $~ after leaving the block
String#gsub with pattern and block sets $~ to MatchData of last match and nil when there's none for access from outside
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4331 bytes
More information about the Ironruby-core