inspection of MatchData shows incorrect results
-----------------------------------------------

                 Key: JRUBY-3727
                 URL: http://jira.codehaus.org/browse/JRUBY-3727
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.3RC2
         Environment: JRUBY_VERSION "1.3.0.RC2"
Should be examples are from 1.2.0
            Reporter: Shawn Ferry
            Priority: Minor


Inspection of match data shows unexpected results

m = /&(.*?); (y+)/.match("aaa & yyy")      
=> #<MatchData "aaa &amp; yyy" 1:"aaa &amp; yyy" 2:"aaa &amp; yyy">

This appears to be a regression, results are as expected in 1.2.0. m.to_s and 
.to_a are as expected

Should be:
=> #<MatchData "&amp; yyy" 1:"amp" 2:"yyy">

Named Captures:
m = /&(?<foo>.*?); (?<bar>y+)/.match("aaa &amp; yyy")
=> #<MatchData "aaa &amp; yyy" foo:"aaa &amp; yyy" bar:"aaa &amp; yyy">

Should be:
m = /&(?<foo>.*?); (?<bar>y+)/.match("aaa &amp; yyy")     
=> #<MatchData "&amp; yyy" foo:"amp" bar:"yyy">



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to