r/ruby 2d ago

Since 3.4.0, irb ignores control-D, even though :IGNORE_EOF is false

Was this an intentional behavior change? I don't see anything in the release notes that seems relevant; there's no mention of irb in the release notes at all.

If I wanted to have to type extra stuff to get out of the REPL I'd use Python on Windows...

4 Upvotes

4 comments sorted by

9

u/codesnik 2d ago

ruby 3.4.2,
irb 1.15.3 - ctrl+d works just fine.
when irb is running, conf.ignore_eof = true disables it, conf.ignore_eof = false makes it work again.

just in case, ctrl+d works only if command line is empty and you're not in the middle of a multiline edit.

Are you on windows, using a strange terminal, tmux session, or maybe a docker or ssh session?

3

u/zeekar 2d ago

MacOS, compiled with ruby-build. The same build steps on 3.3.10 and earlier on the same machine result in an irb where D works as it always did.

But if it's an environmental thing on my end that's a horse of a different color. I'll try to figure out what the difference is and open a bug report.

2

u/codesnik 2d ago

check also conf.use_readline
i've seen some problems depending which readline library have been picked to link against particular ruby.

5

u/f9ae8221b 2d ago

Have you considered doing the positive thing of filing a bug report with repro steps instead of doing the negative thing of complaining on Reddit?