diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-11 10:45:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-11 10:45:34 +0000 |
commit | 96c078c34029bbc525085c4072b7e1ebcc9ec5a3 (patch) | |
tree | 12d7aa3e5192ad8c8416ce85889aaaac5e71561e /test | |
parent | 18364f541b83eddd3b35fa42077f58a8782369f0 (diff) | |
download | ruby-96c078c34029bbc525085c4072b7e1ebcc9ec5a3.tar.gz |
* eval.c (ruby_cleanup): use rb_ary_free to free internal object.
* gc.h (RUBY_FREE_UNLESS_NULL): get rid of double free.
[ruby-core:35192]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 4e53b7fa86..4089eb67a4 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -384,7 +384,7 @@ class TestThread < Test::Unit::TestCase end INPUT - assert_in_out_err(%w(--disable-gems -d), <<-INPUT, %w(false 2), /.+/) + assert_in_out_err(%w(--disable-gems -d), <<-INPUT, %w(false 2), %r".+") p Thread.abort_on_exception begin Thread.new { raise } @@ -577,6 +577,15 @@ class TestThread < Test::Unit::TestCase assert_nothing_raised {arr.hash} assert(obj[:visited]) end + + def test_thread_instance_variable + bug4389 = '[ruby-core:35192]' + assert_in_out_err([], <<-INPUT, %w(), [], bug4389) + class << Thread.current + @data = :data + end + INPUT + end end class TestThreadGroup < Test::Unit::TestCase |