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

Regression in 11.1.2: ArgumentError: argument must respond to `call' #673

Closed
josh-m-sharpe opened this issue Apr 21, 2020 · 9 comments · Fixed by #674
Closed

Regression in 11.1.2: ArgumentError: argument must respond to `call' #673

josh-m-sharpe opened this issue Apr 21, 2020 · 9 comments · Fixed by #674
Labels

Comments

@josh-m-sharpe
Copy link

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

@deivid-rodriguez
Copy link
Owner

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!

@josh-m-sharpe
Copy link
Author

Sure, how do I do that? I usually just drop byebug into my codez. I'm not a fancy byebug user.

@deivid-rodriguez
Copy link
Owner

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.

@josh-m-sharpe
Copy link
Author

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)>

@deivid-rodriguez
Copy link
Owner

Interesting. Can you instead put the file in your current working directory?

@ignatiusreza
Copy link

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'

@deivid-rodriguez
Copy link
Owner

Yeah, it helps. I'll fix shortly and release 1.11.3.

@josh-m-sharpe
Copy link
Author

👍 seems resolved. thank you!

@deivid-rodriguez
Copy link
Owner

No problem, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants