Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.0.0RC2
-
Fix Version/s: JRuby 1.1b1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:svn rev 3795
-
Testcase included:yes
-
Number of attachments :
Description
This code performs differently in MRI than JRuby:
regx = /\G(\w+): (\w)(\r\n)+/
data = "Name: Foobar\r\nAge: 35\r\nWeight: 180\r\nHair: brown\r\n\r\n"
data.scan(regx) {|k,v| p [k,v]}
Another person on irc also noted:
lopex: this doesnt work either: "abc" =~ /\G(.*)/
Actually, that post was not accurate. Here's the source again:
regx = /\G(\w+): (\w)(\r\n)+/
data = "Name: Foobar\r\nAge: 35\r\nWeight: 180\r\nHair: brown\r\n\r\n"
data.scan(regx) {|k,v| p [k,v]}