Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

JRuby compatibility #85

Merged
merged 1 commit into from Jul 27, 2012

Conversation

Projects
None yet
3 participants
Contributor

djreimer commented Jul 17, 2012

When I attempt to run in JRuby, the follow error occurs:

RuntimeError: ObjectSpace is disabled; each_object will only work with Class, pass -X+O to enable each_object at org/jruby/RubyObjectSpace.java:167

By default, ObjectSpace.each_object is disabled in JRuby for performance reasons. However, ObjectSpace.each_object(Class) still works without enabling on the whole enchilada. I made this change and all the specs pass on MRI and JRuby, except for the integration tests (I'm having trouble getting the integration tests to pass on my machine even without the patch). Perhaps someone could verify that those pass as well.

@djreimer djreimer JRuby compatibility
By default, ObjectSpace.each_object is disabled in JRuby. However,
ObjectSpace.each_object(Class) still works.
83cacd7
Contributor

djreimer commented Jul 19, 2012

Sounds good, thanks!

Collaborator

alexch commented Jul 27, 2012

Confirmed to work fine in MRI 1.9.3.

@alexch alexch added a commit that referenced this pull request Jul 27, 2012

@alexch alexch Merge pull request #85 from djreimer/master
JRuby ObjectSpace compatibility fix
75e4bfa

@alexch alexch merged commit 75e4bfa into ctran:master Jul 27, 2012

@lime lime pushed a commit to lime/annotate_models that referenced this pull request Nov 5, 2013

@alexch alexch Integrate various fixes around finding model classes, including ctran#82 076e778

@ctran ctran added the released label Dec 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment