diff --git a/compile.c b/compile.c index 2c388b8a8c..17974b26c0 100644 --- a/compile.c +++ b/compile.c @@ -8773,8 +8773,7 @@ ibf_load_iseq_each(const struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t of rb_raise(rb_eRuntimeError, "path object size mismatch"); } path = rb_fstring(RARRAY_AREF(pathobj, 0)); - realpath = RARRAY_AREF(pathobj, 1); - if (!NIL_P(realpath)) realpath = rb_fstring(realpath); + realpath = rb_fstring(RARRAY_AREF(pathobj, 1)); } else { rb_raise(rb_eRuntimeError, "unexpected path object"); diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 1a45778cc4..4c811611ba 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -398,9 +398,10 @@ class TestISeq < Test::Unit::TestCase def test_to_binary_with_objects code = "[]"+100.times.map{|i|"<