diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-01 00:37:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-01 00:37:47 +0000 |
commit | 7d34ed6ecb9506847c4c85170d8df351b5678ad0 (patch) | |
tree | a5b649021d5c055a40f61c08c4154c68b5754d76 /compile.c | |
parent | 7d55ee287b86bf16dfdb13f4aaa804fca9cfb800 (diff) |
compile.c: fix load_from_binary
* compile.c (ibf_load_iseq_each): realpath may be nil. follow up
r59709. [fix https://github.com/Shopify/bootsnap/issues/132]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -8708,7 +8708,8 @@ 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 = rb_fstring(RARRAY_AREF(pathobj, 1)); + realpath = RARRAY_AREF(pathobj, 1); + if (!NIL_P(realpath)) realpath = rb_fstring(realpath); } else { rb_raise(rb_eRuntimeError, "unexpected path object"); |