Patch for defined?(C && 0) / defined?(super())

e$B%o%J%Y$H?=$7$^$9!#e(B

defined? C && 0 e$B$de(B defined?(super()) e$B$,e(B
BUG e$B$GMn$A$J$$$h$&$K$9$k%Q%C%A$r=q$-$^$7$?!#e(B

e$B$^$?!“e(Bdefined?(super()) e$B$N%3%s%Q%$%k7k2L$r8+$F$_$k$He(B
NODE_SUPER e$B$,e(B “expression” e$B$rJV$7$F$$$k$h$&$@$C$?$N$Ge(B
“super” e$B$rJV$9$h$&$K$7$^$7$?!#;EMM$G$7$?$i?=$7Lu$”$j$^$;$s!#e(B

Index: compile.c

— compile.c (revision 16278)
+++ compile.c (working copy)
@@ -2461,6 +2461,7 @@
needstr);
return 1;

  •  case NODE_SUPER:
     case NODE_ZSUPER:
    
    ADD_INSN(ret, nd_line(node), putnil);
    ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_ZSUPER), 0,
    @@ -2504,7 +2505,7 @@
    }
    ADD_LABEL(ret, lend);
  • ADD_CATCH_ENTRY(CATCH_TYPE_ENSURE, lstart, lend, ensure, lfinish[1]);
  • ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, ensure, lfinish[1]);
    return 1;
    } /* end of default */
    }