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

class name wasn't set properly for some constant in 9.0.5.0? #3641

Closed
godfat opened this issue Feb 4, 2016 · 2 comments
Closed

class name wasn't set properly for some constant in 9.0.5.0? #3641

godfat opened this issue Feb 4, 2016 · 2 comments

Comments

@godfat
Copy link
Contributor

godfat commented Feb 4, 2016

Sorry I can't find a smaller code to reproduce this, but this happens only in jruby 9.0.5.0,
and 9.0.4.0 works fine. Here's the code:
https://github.com/godfat/rest-more/blob/rest-more-3.4.0/lib/rest-core/client/facebook.rb#L8
Builder.client would return a new class, and the name should be set to RestCore::Facebook.
Surprisingly, if you change the constant to FAcebook, it works, and so on so forth.
Interestingly, Github won't work either.

I suspect this was due to that the constant might be considered set somewhere else.

This bug caused this error:
https://travis-ci.org/godfat/rest-more/jobs/106942941#L310
Because we can't serialize anonymous class (which shouldn't be).

@godfat godfat changed the title class name wasn't set properly for some constant? class name wasn't set properly for some constant in 9.0.5.0? Feb 4, 2016
@enebo enebo added this to the JRuby 9.1.0.0 milestone Feb 4, 2016
@kares
Copy link
Member

kares commented Feb 18, 2016

tested bin/jruby -e "require 'rest-core/client/facebook'; p RestCore::Facebook" and is now fine, printing :

RestCore::Facebook

... the cause of the issue is explained at #3645 (comment) marking as duplicate of #3645

@godfat
Copy link
Contributor Author

godfat commented Feb 18, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants