We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cannot load such file -- .../core
Addressing an undefined method inside initialize throws a cryptic error message:
initialize
ArgumentError: not delegated
so to find it out I wanted to use byebug, like this:
require "delegate" MyClass = DelegateClass(Hash) do def initialize require "byebug" byebug undefined_variable_that_caused_error super({ 1=>2 }) end end MyClass.new
but it throws:
Traceback (most recent call last): 8: from temp.rb:10:in `<main>' 7: from temp.rb:10:in `new' 6: from temp.rb:5:in `initialize' 5: from /home/.../.rbenv/versions/2.7.8/lib/ruby/2.7.0/delegate.rb:86:in `method_missing' 4: from /home/.../.rbenv/versions/2.7.8/lib/ruby/2.7.0/delegate.rb:86:in `bind_call' 3: from /home/.../.rbenv/versions/2.7.8/lib/ruby/gems/2.7.0/gems/byebug-11.1.3/lib/byebug/attacher.rb:36:in `byebug' 2: from /home/.../.rbenv/versions/2.7.8/lib/ruby/2.7.0/delegate.rb:86:in `method_missing' 1: from /home/.../.rbenv/versions/2.7.8/lib/ruby/2.7.0/delegate.rb:86:in `bind_call' /home/.../.rbenv/versions/2.7.8/lib/ruby/2.7.0/delegate.rb:86:in `require_relative': cannot load such file -- /home/.../.rbenv/versions/2.7.8/lib/ruby/2.7.0/core (LoadError)
because there https://github.com/ruby/delegate/blob/1c9f9cb37de9c1baa31dad5f67b00f59b765e22a/lib/delegate.rb#L89 they recall your
byebug/lib/byebug/attacher.rb
Line 36 in 7e73848
Not sure who is to blame.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Addressing an undefined method inside
initialize
throws a cryptic error message:so to find it out I wanted to use byebug, like this:
but it throws:
because there https://github.com/ruby/delegate/blob/1c9f9cb37de9c1baa31dad5f67b00f59b765e22a/lib/delegate.rb#L89 they recall your
byebug/lib/byebug/attacher.rb
Line 36 in 7e73848
Not sure who is to blame.
The text was updated successfully, but these errors were encountered: