-
-
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
Weird behavior with #const_get and #const_defined? #4877
Comments
This is likely a difference in when we determine the name for a given class. If you can reduce this it would help...the code you have here is pretty dense and I'll have to tease it apart myself to find the problem. |
@headius Thanks for the follow up. The problem is that I can reproduce this bug only if #const_defined? and #const_get are executed inside an iterator. I agree there's too many codes but still ... not so sure how to simplify this now |
@siutin Provide a simple executable example without spec and try to peel off any lines of code that aren't related. I can think of no reason why running inside an iterator/block would have any effect on these calls. Other thing you could look into is whether the manufactured constant names/scoping/prefix match what you get in MRI; it's equally likely that we're providing different names initially or that we're scoping constants wrong when defined in this way. |
No feedback since December, bumping. |
No feedback for four months, closing for now. If you can provide a simple reproduction, we can reopen. Or if you can't find a simple reproduction and this is still blocking you...we'll consider it 😄 |
Environment:
Below two methods work fine with ruby 2.2, 2.3 and 2.4.
spec
Expected Behavior
ruby 2.3.5
Actual Behavior
jruby 9.1.14.0
The text was updated successfully, but these errors were encountered: