JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6452

rb_class_of() calls static object method instead of static long method

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major 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 :
      0

      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).

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        This was fixed by Wayne well before 1.7pre1.

        Show
        Charles Oliver Nutter added a comment - This was fixed by Wayne well before 1.7pre1.
        Hide
        Charles Oliver Nutter added a comment -
        commit 8234073d5466b0ba22eb6e522c1c0d83d7c546ef
        Author: Wayne Meissner <wmeissner@gmail.com>
        Date:   Tue Feb 14 18:37:40 2012 +1000
        
            Fix JRUBY-6452 - CallStaticLongMethod instead of CallStaticObjectMethod
        
        Show
        Charles Oliver Nutter added a comment - commit 8234073d5466b0ba22eb6e522c1c0d83d7c546ef Author: Wayne Meissner <wmeissner@gmail.com> Date: Tue Feb 14 18:37:40 2012 +1000 Fix JRUBY-6452 - CallStaticLongMethod instead of CallStaticObjectMethod

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Wayne Meissner
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: