-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
parameters on non-Ruby method with special arity will NPE #3040
Comments
I don't think this is resolved yet. The method in this case is an instance of ArgumentDescriptor is being given a null However, the method that
No This is called from INTERPRET_METHOD, which has debug data:
As I mentioned earlier, this only happens in aggregate suite runs - single runs pass - so it may be JIT related or something. |
I am also seeing some strange behaviour which I'm able to reproduce simply from executing |
According to bisection, 49bf2c1 is the responsible commit. |
And confirmed, reverting that commit on HEAD fixes my issues. |
ok the bug now is crystal clear, but the solution (or right solution) may require some refactoring. The reason we see rest in your case is the WrapperMethod is not MethodArgs2 or IRMethodArgs instance so it travels down an else branch on line 2526 on Helpers.java. Notice we do instanceof checks for this helper method but a WrapperMethod can wrap any type of method. I can hack this to ask if it is a WrapperMethod or possibly I can add getRealMethod(). If getRealMethod does what I think then perhaps that is the simplest fix... |
@dekz that is something else. I believe there may be an open issue on some pry issues, but if you cannot find anything then I recommend opening up a new issue. |
@cheald haha...I did not realize that was a PR to fix this. This on the surface seems like the correct fix. I think we are seeing something like WrapperMethod(XMethod(YMethod)). My only reservation is that perhaps we want to return XMethod in some case? Don't know, but it is early enough in RC1 and it feels right. In the majority of cases getRealMethod -> self for most wrapped methods. So this would be an error where we have something like: WrapprMethod(AliasMethod(DynamicMethod)) and we want name from Alias method but we return what it is aliasing. @headius can you think of any cases where wrapper should not just real method the method it is holding? CI is green. |
@cheald I think found this indirectly via Symbol.to_proc on one of these methods.
The text was updated successfully, but these errors were encountered: