Possible regex capture groups bug

On 1.8.7:

$ ruby -e ‘p “a”.match(/^(.*)+$/)[1]’
“a”

On jruby-head:

$ jruby --1.8 -e ‘p “a”.match(/^(.*)+$/)[1]’
“”

Does this count as a bug, given that it matches 1.9.2’s behaviour? I’ll
file it with a quick testcase if so.

Thanks,

Alex

JRuby has only one Regular Expression engine, and it doesn’t change
behavior in 1.8 or 1.9 mode.

Hirotsugu A. wrote in post #967191:

JRuby has only one Regular Expression engine, and it doesn’t change
behavior in 1.8 or 1.9 mode.

Ok, no bug filing for me today then :slight_smile:


Alex

Alex Y. wrote in post #967193:

Hirotsugu A. wrote in post #967191:

JRuby has only one Regular Expression engine, and it doesn’t change
behavior in 1.8 or 1.9 mode.

Ok, no bug filing for me today then :slight_smile:

I have (briefly) documented this here:

http://kenai.com/projects/jruby/pages/DifferencesBetweenMriAndJruby


Alex