Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRB hanging on /\u{ input #729

Closed
kddnewton opened this issue Oct 12, 2023 · 2 comments
Closed

IRB hanging on /\u{ input #729

kddnewton opened this issue Oct 12, 2023 · 2 comments

Comments

@kddnewton
Copy link
Contributor

Description

What are your expected behavior and actual behavior of your environment?

Not sure why, but when you enter an IRB session and type the literal characters: /, \, u, { it hangs indefinitely and the process must be killed.

Result of irb_info

Please paste the result of irb_info command in IRB.

irb(main):001:0> irb_info
=>
Ruby version: 3.2.0
IRB version: irb 1.8.1 (2023-09-04)
InputMethod: RelineInputMethod with Reline 0.3.8
RUBY_PLATFORM: arm64-darwin22
LANG env: en_US.UTF-8
East Asian Ambiguous Width: 1

Terminal Emulator

What's your terminal emulator?

MacOS terminal with zsh

Setting Files

Are you using ~/.irbrc and ~/.inputrc?

No

@tompng
Copy link
Member

tompng commented Oct 12, 2023

#620
It's ruby's bug and fixed in 3.3.0dev https://bugs.ruby-lang.org/issues/19750

All of these hangs up, and it's hard to avoid in IRB side.

RubyVM::AbstractSyntaxTree.parse "/\\u{\n" # not used in IRB
RubyVM::InstructionSequence.compile "/\\u{\n" # code termination check
Ripper.lex "/\\u{\n" # coloring, indent calculation, prompt calculation
Ripper.sexp "/\\u{\n" # command execution, assignment expression check

@kddnewton
Copy link
Contributor Author

Oh sorry I didn't find that it had been reported before. No worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants