-
Notifications
You must be signed in to change notification settings - Fork 200
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
rbs/test: stack level too deep when calling super from prepend #1710
Comments
To simplify the problem, it appears that the hook is adding methods as follows, resulting in an infinite loop. # test-attach.rb
class TestAttach
def attach
puts "attach 2"
end
module RegisterAttach
def attach
puts "attach 1"
super
end
end
prepend RegisterAttach
# append by hook
def with_attach
send(:without_attach)
end
alias without_attach attach
alias attach with_attach
end
TestAttach.new.attach To solve the problem, the structure of the hook may need to be changed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar issue to #478 .
Example:
Run without rbs/test is OK:
Run with rbs/test fails with stack level too deep:
The text was updated successfully, but these errors were encountered: