MatchData#[] always returns nil for negative indices
----------------------------------------------------

                 Key: JRUBY-1101
                 URL: http://jira.codehaus.org/browse/JRUBY-1101
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0RC3
         Environment: OS X 10.4.9, Java 1.5, 2007-06-03 rev 3812
            Reporter: Daniel Berger


As the subject line says:
{noformat}
# jirb
irb(main):001:0> reg = /(.)(.)(\d+)(\d)/   
=> /(.)(.)(\d+)(\d)/
irb(main):002:0> m = reg.match("THX1138.")
=> #<MatchData:0x81f03>
irb(main):003:0> m[-1] # => Should return '8'
=> nil
irb(main):004:0> m[-2] # => Should return '113'
=> nil
{noformat}

-- 
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