aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_beginendblock.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_beginendblock.rb')
-rw-r--r--test/ruby/test_beginendblock.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb
index 0543476875..4e9a4b72b9 100644
--- a/test/ruby/test_beginendblock.rb
+++ b/test/ruby/test_beginendblock.rb
@@ -173,4 +173,16 @@ EOW
assert_equal(["", "", 42], [out, err, status.exitstatus], "#{bug5218}: #{ex}")
end
end
+
+ def test_callcc_at_exit
+ bug9110 = '[ruby-core:58329][Bug #9110]'
+ ruby = EnvUtil.rubybin
+ script = <<EOS
+require "continuation"
+c = nil
+at_exit { c.call }
+at_exit { callcc {|_c| c = _c } }
+EOS
+ assert system(ruby, "-e", script)
+ end
end