You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a ruby script with File.write("a.rb", "# coding: sjis\nbinding.irb\n__END__\nあ".encode("sjis"))
Run ruby a.rb
IRB fails to colorize code around binding.irb
ruby -e 'File.write("a.rb", "# coding: sjis\nbinding.irb\n__END__\nあ".encode("sjis"))'
ruby a.rb
/Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/reline-0.5.9/lib/reline/unicode.rb:52:in `ord': invalid byte sequence in UTF-8 (ArgumentError)
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/reline-0.5.9/lib/reline/unicode.rb:52:in `block in escape_for_print'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/reline-0.5.9/lib/reline/unicode.rb:45:in `map!'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/reline-0.5.9/lib/reline/unicode.rb:45:in `escape_for_print'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/color.rb:139:in `block in colorize_code'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/color.rb:192:in `block (2 levels) in scan'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/color.rb:204:in `block (2 levels) in scan'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/color.rb:202:in `each'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/color.rb:202:in `block in scan'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/ruby-lex.rb:57:in `rescue in compile_with_errors_suppressed'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/ruby-lex.rb:46:in `compile_with_errors_suppressed'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/color.rb:179:in `scan'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/color.rb:136:in `colorize_code'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb/workspace.rb:161:in `code_around_binding'
from /Users/tomoya.ishida/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/irb-1.13.2/lib/irb.rb:1584:in `irb'
from <internal:prelude>:5:in `irb'
from a.rb:1:in `<main>'
Combination
# encoding: utf-8 and file: sjisFile.write("a.rb","binding.irb\n__END__\nあ".encode("sjis"))# error# encoding: sjis and file: sjisFile.write("b.rb","# coding: sjis\ns='あ'\nbinding.irb".encode("sjis"))# no errorFile.write("c.rb","# coding: sjis\nbinding.irb\n__END__\nあ".encode("sjis"))# error# encoding: sjis and file: utf-8File.write("d.rb","# coding: sjis\nbinding.irb\n__END__\nあ")# no error
The text was updated successfully, but these errors were encountered:
Description
Create a ruby script with
File.write("a.rb", "# coding: sjis\nbinding.irb\n__END__\nあ".encode("sjis"))
Run
ruby a.rb
IRB fails to colorize code around
binding.irb
Combination
The text was updated successfully, but these errors were encountered: