-
Notifications
You must be signed in to change notification settings - Fork 85
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
Suspend not working in IRB Ruby 3.1.2 #466
Comments
I suppose that the "ZSH" is not the terminal emulator but the shell. The terminal emulator is like "terminator", "alacrity", "xterm" and etc. See https://en.wikipedia.org/wiki/List_of_terminal_emulators. |
@junaruga my mistake, I use iTerm2 but Terminal on Mac OS is also affected. |
It looks like that bug got in at #335. |
@elfham that was a year ago. Is IRB in Ruby 3.1.2 really that old? I have the problem with this sample code running against reline master with Ruby 3.1.2: require "reline"
prompt = "> "
begin
while true
text = Reline.readmultiline(prompt) do |data|
puts "in", data
end
puts "you entered"
puts text
end
rescue Interrupt
puts "CTRL-C"
exit 0
end Using |
Since this bug was introduced in #335, I believe that subsequent versions of Reline have had the problem. As I commented in #321 (comment) , I think commit #335 is inappropriate and should be reverted once. |
Just installed Ruby 3.2.0 and ran into this same problem (Ubuntu Linux). |
I can confirm that this is still an issue in main for all ruby versions and that it's caused by #335. I use the following awkward monkeypatch in module Signal
@real_trap = method(:trap)
def self.trap(*args, &block)
if args[0] != 'TSTP'
@real_trap.call(*args, &block)
end
end
end I've opened #535 to revert the prior PR, as I don't believe it does anything useful. |
Description
When I enter IRB session, I expect pressing
CTRL-Z
to suspend the program, but it does not. If I press<Enter>
afterCTRL-Z
I seeirb(main):002:0* ^Z
Suspend functionality works fine for me on Ruby 2.7 and Ruby 3.0.1
Terminal Emulator
What's your terminal emulator?
ZSHiTerm2 and Terminal on Mac OS
The text was updated successfully, but these errors were encountered: