Conversation
elia
requested changes
Oct 30, 2020
elia
left a comment
Member
There was a problem hiding this comment.
The solution is interesting, but I'd like to preserve having Native inherit from BasicObject… is it possible to have a sort of Native::Kernel that will add the missing functionality when included in a Native::Object?
|
|
||
| if (!meth || meth.$$stub) { | ||
| #{raise NameError.new("undefined method `#{name}' for class `#{self.class}'", name)}; | ||
| #{::Kernel.raise NameError.new("undefined method `#{name}' for class `#{self.class}'", name)}; |
Member
There was a problem hiding this comment.
This shouldn't be necessary as #raise is also implemented by Kernel so it should be already available in this context.
Member
|
I'm closing this as we need to find a different approach to address this issue, feel free to ping me for reopening it 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements
Nativeto behave both like a Module (as was before) and also like a Class which allows native objects to be extended as Ruby objects.Consider this example
In this way this PR also resolves #2113 and makes that
#sendand#methodworks.