aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r--test/ruby/test_thread.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 529c52f4ba..dbe4ac21b9 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -34,6 +34,19 @@ class TestThread < Test::Unit::TestCase
th.join
end
+ def test_inspect_with_fiber
+ inspect1 = inspect2 = nil
+
+ Thread.new{
+ inspect1 = Thread.current.inspect
+ Fiber.new{
+ inspect2 = Thread.current.inspect
+ }.resume
+ }.join
+
+ assert_equal inspect1, inspect2, '[Bug #13689]'
+ end
+
def test_main_thread_variable_in_enumerator
assert_equal Thread.main, Thread.current