diff options
| author | yui-knk <spiketeika@gmail.com> | 2022-12-26 17:45:44 +0900 |
|---|---|---|
| committer | Yuichiro Kaneko <spiketeika@gmail.com> | 2023-01-06 09:22:09 +0900 |
| commit | 979dd02e2f0a70f3f30d47c6115780d8fac6147e (patch) | |
| tree | 926a7eb7ee9c0739b20804e19465979c61b94912 /test/ruby | |
| parent | 2056c0a7c680350cf92a134e355c03e1efb10549 (diff) | |
Check if the argument is Thread::Backtrace::Location object
[Bug #19262]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7029
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_ast.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index 8acf4fe254..e43dac28b3 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -227,6 +227,12 @@ class TestAst < Test::Unit::TestCase assert_equal node.node_id, node_id end + def test_node_id_for_backtrace_location_raises_argument_error + bug19262 = '[ruby-core:111435]' + + assert_raise(TypeError, bug19262) { RubyVM::AbstractSyntaxTree.node_id_for_backtrace_location(1) } + end + def test_of_proc_and_method proc = Proc.new { 1 + 2 } method = self.method(__method__) |
