Regression in 11.1.2: ArgumentError: argument must respond to `call'
josh-m-sharpe opened this issue · 9 comments
Problem description
Using the latest version 11.1.2, byebug is exiting the debugger after a moment and raising the error: ArgumentError: argument must respond to `call'
You can't see it, in the below copy/paste, but it does drop to a (byebug)
debugger for a split second before throwing this argument error.
Reverting to 11.1.1 fixes the issue
Using ruby 2.6.6
[2] pry(main)> reload! ; e = Event.last ; e.foo
[37, 44] in /Users/jsharpe/project/server/app/models/event.rb
37:
38: def foo
39: byebug
=> 40: puts 123
41: end
42:
ArgumentError: argument must respond to `call'
from /Users/jsharpe/.rvm/gems/ruby-2.6.6@project/gems/rb-readline-0.5.5/lib/readline.rb:93:in
`completion_proc='
[3] pry(main)>
Expected behavior
no error
Actual behavior
see above
Steps to reproduce the problem
install 11.1.2 and use byebug
My bad 🙏, I'll fix it shortly.
I'm curious where this is coming from though. Could you run set stack_on_error
and then force the error to occur and copy the stacktrace here?
Thanks!
Sure, how do I do that? I usually just drop byebug
into my codez. I'm not a fancy byebug user.
Oh, sorry, I missed that you can't even get to the byebug prompt at all 😬.
Then do this. Create a .byebugrc
file in your HOME directory with the following content
set stack_on_error
Then run your code and post the error here.
That doesn't appear to change much:
$ cat ~/.byebugrc
set stack_on_error
$ rc
Loading development environment (Rails 6.0.2.2)
[
1] pry(main)> Event.last.foo
[15, 24] in /Users/jsharpe/project/app/models/event.rb
15: )
16: end
17:
18: def foo
19: byebug
=> 20: puts 123
21: end
22:
ArgumentError: argument must respond to `call'
from /Users/jsharpe/.rvm/gems/ruby-2.6.6@project/gems/rb-readline-0.5.5/lib/readline.rb:93:in `completion_proc='
[2] pry(main)>
Interesting. Can you instead put the file in your current working directory?
not sure if it would help.. I'm having the same error, but with a longer stack trace..
ArgumentError:
argument must respond to `call'
# /path/to/ruby/gems/rb-readline-0.5.5/lib/readline.rb:93:in `completion_proc='
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/interfaces/local_interface.rb:56:in `without_readline_completion'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/interfaces/local_interface.rb:24:in `block in readline'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/interfaces/local_interface.rb:36:in `with_repl_like_sigint'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/interfaces/local_interface.rb:24:in `readline'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/interface.rb:71:in `prepare_input'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/interface.rb:55:in `read_input'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/interface.rb:38:in `read_command'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/processors/command_processor.rb:128:in `repl'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/processors/command_processor.rb:97:in `process_commands'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/processors/command_processor.rb:55:in `at_line'
# /path/to/ruby/gems/byebug-11.1.2/lib/byebug/context.rb:98:in `at_line'
Yeah, it helps. I'll fix shortly and release 1.11.3.
👍 seems resolved. thank you!
No problem, thanks for reporting!