diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-29 01:03:29 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-29 06:39:57 +0900 |
commit | 9b751db99cb70c1f63e34f92955442167079d330 (patch) | |
tree | 7d9143a281a42bf9d19eb6b6100c4d75298f5f2c /test/ruby | |
parent | f8bbd608c9a0f34e44c4b14f7b913da061e71a70 (diff) |
Fix script_lines in loaded iseq as nil
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5047
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_iseq.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index edd131823e..7125a5ac6d 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -464,6 +464,11 @@ class TestISeq < Test::Unit::TestCase a1 = iseq.to_a a2 = iseq2.to_a assert_equal(a1, a2, message(mesg) {diff iseq.disassemble, iseq2.disassemble}) + if iseq2.script_lines + assert_kind_of(Array, iseq2.script_lines) + else + assert_nil(iseq2.script_lines) + end iseq2 end |