We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regexps store a lookup table for the matchdata, but only the last index is actually used to retreive the match.
Here's an example:
r = /(?: (?<alpha>\d)A(?<beta>\d) | (?<alpha>\d)B(?<beta>\d) )/x data = r.match "1A5" p [data[:alpha], data[:beta]] data = r.match "1B5" p [data[:alpha], data[:beta]]
Running this file gives different results between Rubinius and MRI:
mri-1.9.3 > ruby test.rb ["1", "5"] ["1", "5"] mri-2.0.0 > ruby test.rb ["1", "5"] ["1", "5"] rbx-2.1.1 > ruby test.rb [nil, nil] ["1", "5"]
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Regexps store a lookup table for the matchdata, but only the last index is actually used to retreive the match.
Here's an example:
Running this file gives different results between Rubinius and MRI:
The text was updated successfully, but these errors were encountered: