[MacRuby] #1341: StringScanner#scan should not set into Regexp.last_match
MacRuby
ruby-noreply at macosforge.org
Sun Jun 26 09:31:01 PDT 2011
#1341: StringScanner#scan should not set into Regexp.last_match
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Test Script:
{{{
#!ruby
require 'strscan'
"hello, world" =~ /hello/
s = StringScanner.new('test string')
p s.scan(/\w+/) # -> "test"
p $~ # Regexp.last_match
}}}
Result:
{{{
$ ruby19 t.rb
"test"
#<MatchData "hello">
$ macruby t.rb
"test"
#<MatchData "test">
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1341>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list