You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❱ ./bin/consoleirb(main):001> ^DRELINE_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 briefly looked into this issue. As expected, it appears that the Kernel's exit method is being called.
Because the exit method is inherited, the following respond_to? method returns true. (then, the exit method is executed.)
exit is not an existing GNU-Readline functon name. GitHub code search of Readline's config shows that "[key binding here]": exit doesn't seem to be used in real world, so I don't see a use case. Reline just doesn't support exit functionality just like GNU Readline.
The problem is not only for Kernel's method.
"\C-d":initialize"\C-e":move_history
Will call LineEditor#initialize or LineEditor#move_history (internal method) with wrong argument.
Reline maintainer team, including me, thinks there is a maintainability issue in this part
It registers end-of-history as a function. This part is OK (except it just look like normal method aliasing)
Unknown weather ed-end-of-history is intended to register as a function, or it's just a meaningful method name that expresses it originates from Editline
end-of_history and end_of-history etc are also registered
Hard to distinguish valid function from unused method that need to be removed as a refactoring.
And problems described in this issue: No error handling, No warning, etc.
To fix this root cause, we need a large-diff refactoring that introduce explicit function-name register mechanism.
Workaround pull requests are welcome (If the workaround is simple enough)
Activity
t-mangoe commentedon Dec 6, 2025
I briefly looked into this issue. As expected, it appears that the
Kernel'sexitmethod is being called.Because the exit method is inherited, the following
respond_to?method returns true. (then, the exit method is executed.)reline/lib/reline/line_editor.rb
Line 955 in 4fe1ff9
I think only methods defined in the
LineEditorclass should be called. How about that?tompng commentedon Dec 6, 2025
exitis not an existing GNU-Readline functon name. GitHub code search of Readline's config shows that"[key binding here]": exitdoesn't seem to be used in real world, so I don't see a use case. Reline just doesn't supportexitfunctionality just like GNU Readline.The problem is not only for Kernel's method.
Will call
LineEditor#initializeorLineEditor#move_history(internal method) with wrong argument.Reline maintainer team, including me, thinks there is a maintainability issue in this part
ed-end-of-historyis intended to register as a function, or it's just a meaningful method name that expresses it originates from Editlineend-of_historyandend_of-historyetc are also registeredTo fix this root cause, we need a large-diff refactoring that introduce explicit function-name register mechanism.
Workaround pull requests are welcome (If the workaround is simple enough)