Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: C Extensions
-
Labels:None
-
Number of attachments :
Description
rb_class_of() contains this line:
return (VALUE) env->CallStaticObjectMethod(JRuby_class, JRuby_getMetaClass, valueToObject(env, obj));
You can't cast a java object directly to VALUE like that, and if you look at the helper method in JRuby.java, it in fact returns long (which can be cast to VALUE).
This was fixed by Wayne well before 1.7pre1.