# \[Bug #3229\] iseq\_s\_load $B$G(B TypeError $BH/@8(B

**URL:** <https://www.ruby-forum.com/t/bug-3229-iseq-s-load-b-g-b-typeerror-bh-8-b/187897>\
**Category:** Development\
**Created:** [May 1, 2010, 4:57am UTC](https://www.ruby-forum.com/t/bug-3229-iseq-s-load-b-g-b-typeerror-bh-8-b/187897 "2010-05-01T04:57:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomoyuki\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c0e974/32.png) [@Tomoyuki\_C](https://www.ruby-forum.com/u/Tomoyuki_C)\
**Post date:** [May 1, 2010, 4:57am UTC](https://www.ruby-forum.com/t/bug-3229-iseq-s-load-b-g-b-typeerror-bh-8-b/187897/1 "2010-05-01T04:57:28Z")

</div>

Bug #3229: iseq\_s\_load e$B$Ge(B TypeError e$BH/@8e(B  
[http://redmine.ruby-lang.org/issues/show/3229](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++));
