Project

General

Profile

Actions

Bug #20622

closed

irb: invalid byte sequence in UTF-8

Added by chmaynard (Craig Maynard) 8 days ago. Updated 6 days ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [arm64-darwin23]
[ruby-core:118524]

Description

Ruby $ irb
/opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/config.rb:172:in `match': invalid byte sequence in UTF-8 (ArgumentError)

  next if line.match(/\A\s*#/)
                     ^^^^^^^^

Updated by chmaynard (Craig Maynard) 8 days ago ยท Edited

from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/config.rb:172:in `match'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/config.rb:172:in `block in read_lines'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/config.rb:171:in `each'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/config.rb:171:in `each_with_index'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/config.rb:171:in `read_lines'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/config.rb:127:in `read'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline.rb:316:in `inner_readline'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline.rb:268:in `block (2 levels) in readmultiline'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/ansi.rb:162:in `block in with_raw_input'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/ansi.rb:162:in `raw'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline/ansi.rb:162:in `with_raw_input'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline.rb:267:in `block in readmultiline'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline.rb:261:in `synchronize'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/reline.rb:261:in `readmultiline'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/forwardable.rb:240:in `readmultiline'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb/input-method.rb:474:in `gets'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1073:in `block in read_input'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1380:in `signal_status'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1071:in `read_input'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1093:in `readmultiline'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1118:in `block in each_top_level_statement'
from <internal:kernel>:187:in `loop'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1117:in `each_top_level_statement'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1040:in `eval_input'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1021:in `block in run'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1020:in `catch'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:1020:in `run'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/3.3.0/irb.rb:904:in `start'
from /opt/homebrew/Cellar/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/irb-1.13.1/exe/irb:9:in `<top (required)>'
from /opt/homebrew/opt/ruby/bin/irb:25:in `load'
from /opt/homebrew/opt/ruby/bin/irb:25:in `<main>'

Updated by mame (Yusuke Endoh) 8 days ago

Perhaps your ~/.inputrc contains non UTF-8 characters.

Updated by chmaynard (Craig Maynard) 6 days ago

Good advice, thanks. Problem solved by changing the encoding of ~/.inputrc to UTF-8.

Actions #4

Updated by alanwu (Alan Wu) 6 days ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0