[Bug #3229] iseq_s_load で TypeError 発生

Bug #3229: iseq_s_load e$B$Ge(B TypeError e$BH/@8e(B
http://redmine.ruby-lang.org/issues/show/3229

e$B5/I<<Te(B: Tomoyuki C.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.2dev (2010-04-30 trunk 27566) [x86_64-darwin10.3.0]

[ruby-dev:40911] e$B$r%A%1%C%H$K$5$;$FD:$-$^$9!#e(B

RubyGems e$B$Ne(B iseq e$B%i%$%V%i%j$rMxMQ$7$F!"J8;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

$ cat test.rb
require iseq

iseq = ISeq.compile(pust Hello World)
ISeq.load(iseq.to_a)
$ ruby -v test.rb
ruby 1.9.2dev (2010-04-30 trunk 27566) [x86_64-darwin10.3.0]
test.rb:4:in load': can't convert nil into String (TypeError) from test.rb:4:in

iseq->filepath e$B$,e(B nil
e$B$N>l9g$,$"$k$N$KBP1~$7$F$$$J$$$h$&$G$9!#e(B
e$B0J2<$N%Q%C%A$G>e5-$N%3!<%I$OF0$/$h$&$K$J$j$^$7$?!#e(B

Index: iseq.c

iseq.c (revision 27566)
+++ iseq.c (working copy)
@@ -465,7 +465,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++));

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