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

Binding to exit command causes TypeError #819

Open
13k opened this issue Feb 15, 2025 · 0 comments
Open

Binding to exit command causes TypeError #819

13k opened this issue Feb 15, 2025 · 0 comments

Comments

@13k
Copy link

13k commented Feb 15, 2025

inputrc:

Control-d: exit
❱ ./bin/console
irb(main):001> ^D
RELINE_SRCDIR/lib/reline/line_editor.rb:975:in 'Kernel#exit': no implicit conversion of String into Integer (TypeError)
	from RELINE_SRCDIR/lib/reline/line_editor.rb:975:in 'Method#call'
	from RELINE_SRCDIR/lib/reline/line_editor.rb:975:in 'Reline::LineEditor#wrap_method_call'
	from RELINE_SRCDIR/lib/reline/line_editor.rb:941:in 'Reline::LineEditor#run_for_operators'
	from RELINE_SRCDIR/lib/reline/line_editor.rb:1001:in 'Reline::LineEditor#process_key'
	from RELINE_SRCDIR/lib/reline/line_editor.rb:1027:in 'Reline::LineEditor#input_key'
	from RELINE_SRCDIR/lib/reline/line_editor.rb:1005:in 'Reline::LineEditor#update'
        <omitted>

I didn't follow the whole call chain, but I'm guessing key.method_symbol == :exit and wrap_method_call simply grabs the method from top-level Kernel and calls it with a string parameter, causing the TypeError exception.

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

1 participant