Skip to content

Binding to exit command causes TypeError #819

Description

@13k

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions