aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_method.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index ddeb6d6c87..86ab64feb1 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -228,6 +228,10 @@ class TestMethod < Test::Unit::TestCase
assert_in_out_err([], "p __callee__", %w(nil), [])
end
+ def test_caller_top_level
+ assert_in_out_err([], "p caller", %w([]), [])
+ end
+
def test_caller_negative_level
assert_raise(ArgumentError) { caller(-1) }
end