diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-15 14:27:38 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-15 16:06:48 +0900 |
commit | a9567cc2bfad37cc22b3efe0971ba85bd9c1df34 (patch) | |
tree | ed546873bf8b2892a2882755f22f0e7920242282 /test/ruby/test_iseq.rb | |
parent | 1dad9fa5e1303ce0ba38f55ae81b87ab3857df62 (diff) |
Added test for `debug_level:` option of `RubyVM::InstructionSequence.compile`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3033
Diffstat (limited to 'test/ruby/test_iseq.rb')
-rw-r--r-- | test/ruby/test_iseq.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 02c3967022..960b7b79fc 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -571,4 +571,12 @@ class TestISeq < Test::Unit::TestCase assert_not_nil(invokebuiltin) assert_equal([:func_ptr, :argc, :index, :name], invokebuiltin[1].keys) end + + def test_iseq_option_debug_level + assert_raise(TypeError) {ISeq.compile("", debug_level: "")} + assert_ruby_status([], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + RubyVM::InstructionSequence.compile("", debug_level: 5) + end; + end end |