Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ def wrap_method_call(method_symbol, key, with_operator)

return unless respond_to?(method_symbol, true)
method_obj = method(method_symbol)
# Not an editing function, e.g. Kernel#exit bound in inputrc
return if Object <= method_obj.owner
if @vi_arg and argumentable?(method_obj)
if inclusive?(method_obj)
method_obj.(key, arg: @vi_arg, inclusive: with_operator)
Expand Down
9 changes: 9 additions & 0 deletions test/reline/test_macro.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@ class << @line_editor
}
assert_equal 'ab', @line_editor.line
end

def test_ignore_method_inherited_from_object
input('abc')
assert_nothing_raised {
input_key("\C-d", :exit)
input_key("\C-d", :sleep)
}
assert_equal 'abc', @line_editor.line
end
end
Loading