Iseq_s_load が filepath の指定のない ISeq で TypeError 発生

nagachika e$B$H?=$7$^$9!#e(B

ISeq e$B$GHs8x3+$Ne(B iseq_s_load
e$B$r;H$C$FM7$s$G$$$F5$$,$D$$$?$N$G$9$,!"e(B
trunk e$B$GJ8;zNs$+$ie(B compile e$B$7$?e(B ISeq
e$B$r%m!<%I$5$;$h$&$H$9$k$He(B
e$B0J2<$N$h$&$Ke(B TypeError e$B$,H/@8$7$^$9!#e(B

iseq_test.rb:12:in `load: cant convert nil into String (TypeError)

iseq->filepath e$B$,e(B nil
e$B$N>l9g$,$"$k$N$KBP1~$7$F$$$J$$$h$&$G$7$?!#e(B
e$B0J2<$K%Q%C%A$rE=$jIU$1$^$9!#e(B

e$B$D$$$G$Ke(B 1.9.2-preview1 e$B$H8+Hf$Y$F!e(BISeq#to_a
e$B$N7k2L$Ke(B filepath e$B$He(B lineno e$B$,e(B
e$BDI2C$5$l$F$$$k$N$G!0l1~%P!<%8%g%s$r>e$2$k$N$,NI$$$N$G$O$J$$$+$H;W$$e(B
minor e$B$re(B 2->3 e$B$K$7$F$_$^$7$?!#e(B
e$B$b$C$H$be(B iseq_s_load
e$B$G%P!<%8%g%s%A%%C%/$7$F$J$$$G$9$7!$=$b$=$be(B iseq_s_load e$B$Oe(B
e$BHs8x3+$J$N$G!$^[email protected]>e$2$k$Y$-;~$G$O$J$$$H$$$&$3$H$G$"$l$P$3$l$OGK4~$7$F$/[email protected]$5$$!#e(B

e$B0J>e!"$h$m$7$/$*4j$$$7$^$9!#e(B

Index: iseq.c

iseq.c (revision 27209)
+++ iseq.c (working copy)
@@ -458,7 +458,8 @@

 name        = CHECK_STRING(rb_ary_entry(data, i++));
 filename    = CHECK_STRING(rb_ary_entry(data, i++));
  • filepath = CHECK_STRING(rb_ary_entry(data, i++));
  • filepath = rb_ary_entry(data, i++);

  • filepath = NIL_P(filepath) ? Qnil : CHECK_STRING(filepath);
    line_no = CHECK_INTEGER(rb_ary_entry(data, i++));

    type = CHECK_SYMBOL(rb_ary_entry(data, i++));
    @@ -1321,7 +1322,7 @@
    /
    rb_ary_push(val,
    rb_str_new2(YARVInstructionSequence/SimpleDataFormat));
    rb_ary_push(val, INT2FIX(1)); /
    major */

  • rb_ary_push(val, INT2FIX(2)); /* minor */
  • rb_ary_push(val, INT2FIX(3)); /* minor */
    rb_ary_push(val, INT2FIX(1));
    rb_ary_push(val, misc);
    rb_ary_push(val, iseq->name);

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs