1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/-ext-/vm/test_at_exit.rb

20 lines
393 B
Ruby
Raw Normal View History

# frozen_string_literal: false
class TestVM < Test::Unit::TestCase
# [Bug #12095]
def test_at_exit
assert_in_out_err([], <<-"end;", %w[begin end]) # do
require '-test-/vm/at_exit'
Bug::VM.register_at_exit(false)
1000.times do
Bug::VM.register_at_exit(nil)
["x"]*1000
end
GC.start
Bug::VM.register_at_exit(true)
end;
end
end