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

Allow missing method implementation in Ruby code #359

Merged
merged 1 commit into from
Aug 10, 2020
Merged

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Aug 8, 2020

Having multiple module and class declarations causes a problem of undefined method ____'onalias_methodcalls. This is because the hook installation happens on:end` event of TracePoint.

module SuperLibrary
  # defines classes of the library
  class SomeClass
  end
end                        # Hook install happens here, but no `foo` method defined yet. 💣 💥 

module SuperLibrary
  # The library itself has methods
  def foo()
    # ...
  end
end

To avoid this error, it now does method existence check and hook definition duplication check.

@soutaro soutaro force-pushed the open-module-decls branch from a03361b to f2e9c8a Compare August 10, 2020 13:46
@soutaro soutaro merged commit daf6c49 into master Aug 10, 2020
@soutaro soutaro deleted the open-module-decls branch August 10, 2020 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant