Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.3.1
-
Fix Version/s: JRuby 1.4
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Mac OS X
-
Number of attachments :
Description
JRuby gives me different results than Ruby 1.8.6 (and 1.8.7) here:
~/ruby/coderay ruby -e 'p "ä"[/#{/\w/}/uo]'
"\303\244"
~/ruby/coderay jruby -e 'p "ä"[/#{/\w/}/uo]'
nil
~/ruby/coderay jruby -v
jruby 1.3.1 (ruby 1.8.6p287) (2009-09-08 6586) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
The problem seems to be that /o somehow treats the embedded regexp differently.
Confirmed in both compiler and interpreter:
~/projects/jruby ➔ jruby -e 'p "ä"[/#{/\w/}/uo]' nil ~/projects/jruby ➔ jruby -X-C -e 'p "ä"[/#{/\w/}/uo]' nil~/projects/jruby ➔ jruby -e 'p "ä"[/#{/\w/}/uo]' nil ~/projects/jruby ➔ jruby -X-C -e 'p "ä"[/#{/\w/}/uo]' nil