-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
The same error like #2528 for the method gsub:
jruby-1.7.19 :001 > str = 9999.to_s
=> "9999"
jruby-1.7.19 :002 > str.encoding
=> #<Encoding:US-ASCII>
jruby-1.7.19 :003 > str.sub("¥", "")
=> "9999"
jruby-1.7.19 :005 > str.gsub(/¥/, "")
=> "9999"
jruby-1.7.19 :004 > str.gsub("¥", "")
RegexpError: invalid multibyte character: /Â¥/
from org/jruby/RubyString.java:3085:in `gsub'
from org/jruby/RubyString.java:3053:in `gsub'
from (irb):4:in `evaluate'
from org/jruby/RubyKernel.java:1107:in `eval'
from org/jruby/RubyKernel.java:1507:in `loop'
from org/jruby/RubyKernel.java:1270:in `catch'
from org/jruby/RubyKernel.java:1270:in `catch'
from /home/joe/.rvm/rubies/jruby-1.7.19/bin/irb:13:in `(root)'Reactions are currently unavailable