[MacRuby] #948: MacRuby should match with Regexp, distinguish between '\r' and '\n'.
MacRuby
ruby-noreply at macosforge.org
Fri Oct 8 21:25:29 PDT 2010
#948: MacRuby should match with Regexp, distinguish between '\r' and '\n'.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Test Script:
{{{
p /^bar/.match("foo\rbar") # => nil
p /^bar/.match("foo\nbar")
p /^bar/.match("foo\r\nbar")
p "--"
p /foo$/.match("foo\rbar") # => nil
p /foo$/.match("foo\nbar")
p /foo$/.match("foo\r\nbar") # => nil
}}}
Result:
{{{
$ ruby19 test_regexp.rb
nil
#<MatchData "bar">
#<MatchData "bar">
"--"
nil
#<MatchData "foo">
nil
$ macruby test_regexp.rb
#<MatchData "bar">
#<MatchData "bar">
#<MatchData "bar">
"--"
#<MatchData "foo">
#<MatchData "foo">
#<MatchData "foo">
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/948>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list