[Ironruby-core] Code Review: StringGsubWithStringPatternAndBlock

Dave Remy dremy at microsoft.com
Thu Jul 3 20:26:44 EDT 2008


tfpt review "/shelveset:StringGsubWithStringPatternAndBlock;REDMOND\dremy"
Comment  :
  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...
Name: StringGsubWithStringPatternAndBlock.diff
Type: application/octet-stream
Size: 4331 bytes
Desc: StringGsubWithStringPatternAndBlock.diff
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080703/f66b649f/attachment.obj>


More information about the Ironruby-core mailing list