diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-25 10:41:16 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-25 10:41:16 +0000 |
commit | e87fb88be844f0fae736768846954b6f6f7dc7c3 (patch) | |
tree | cbe2ab069e40b5b7f3217ce95b793426b303a305 /spec/ruby/core/kernel/caller_spec.rb | |
parent | e59bf54b3a88d0465cca021afae7dc05b6db57a7 (diff) |
Update to ruby/spec@241f9e7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/kernel/caller_spec.rb')
-rw-r--r-- | spec/ruby/core/kernel/caller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/kernel/caller_spec.rb b/spec/ruby/core/kernel/caller_spec.rb index c4c2752859..8469319c94 100644 --- a/spec/ruby/core/kernel/caller_spec.rb +++ b/spec/ruby/core/kernel/caller_spec.rb @@ -34,4 +34,13 @@ describe 'Kernel#caller' do locations[0].should include("#{__FILE__}:#{line}:in") end + + it "returns an Array with the block given to #at_exit at the base of the stack" do + path = fixture(__FILE__, "caller_at_exit.rb") + lines = ruby_exe(path).lines + lines.should == [ + "#{path}:6:in `foo'\n", + "#{path}:2:in `block in <main>'\n" + ] + end end |