Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6RC1
-
Fix Version/s: JRuby 1.6.7
-
Component/s: Ruby 1.9.2
-
Labels:None
-
Number of attachments :
Description
From http://redmine.ruby-lang.org/issues/show/4340
The example script there behaves differently inconsistently on JRuby ![]()
~/projects/jruby ➔ jruby --1.9 t.rb using gsub "Hello Everybody!" #<Encoding:ASCII-8BIT> "Hi World!" #<Encoding:ASCII-8BIT> using sub "Hello Everybody!" #<Encoding:UTF-8> "Hi World!" #<Encoding:UTF-8>
It appears to be using the pattern's encoding in gsub and the original's encoding in sub (and our pattern's encoding is wrong due to other issues).
This is not in 1.9.2 yet and we can keep track of this issue for 1.9.3.