[Ironruby-core] Code Review: Regex6

Tomas Matousek Tomas.Matousek at microsoft.com
Tue May 27 21:36:23 EDT 2008


tfpt review "/shelveset:Regex6;REDMOND\tomat"

Regexp fixes:

-       Implements Regexp.initialize
-       Fixes Regexp.new and compile signatures.
-       Regexp.new does no escaping, it just takes whatever string is given and makes up Regexp
-       Regexp.to_s returns "(?{enabled-options}-{disabled-options}:{pattern-with-forward-slash-escaped})"
-       Regexp.inspect returs "/{pattern-with-forward-slash-escaped}/"
-       Regexp.union does Regexp.escape (w/o calling it) on given strings (and objects converted using to_str   ) and does Regexp.to_s (w/o calling it) on given regexes, concatenates all results using | as separator and calls Regexp.new(<concatenated>, nil, nil) on the result.

Fixes escaping of strings (String#inspect).
Fixes chr, IO.write to honor current encoding.
Makes ConsoleStreams host-redirectable.

Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Regex6.diff
Type: application/octet-stream
Size: 62071 bytes
Desc: Regex6.diff
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080527/4fb0726a/attachment-0001.obj>


More information about the Ironruby-core mailing list