зеркало из https://github.com/github/ruby.git
* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
add a test. Unlike TestThread#test_no_valid_cfp, this test succeeds even if win32ole is required (see r33153). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
aa6ebbe329
Коммит
7c9b9977b0
|
@ -1,3 +1,9 @@
|
|||
Sun Sep 4 00:47:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||
|
||||
* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
|
||||
add a test. Unlike TestThread#test_no_valid_cfp,
|
||||
this test succeeds even if win32ole is required (see r33153).
|
||||
|
||||
Sun Sep 4 00:11:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* variable.c (rb_const_set): show the previous definition
|
||||
|
|
|
@ -208,5 +208,17 @@ class TestFiber < Test::Unit::TestCase
|
|||
GC.start
|
||||
}, bug4612
|
||||
end
|
||||
|
||||
def test_no_valid_cfp
|
||||
bug5083 = '[ruby-dev:44208]'
|
||||
error = assert_raise(RuntimeError) do
|
||||
Fiber.new(&Module.method(:nesting)).resume
|
||||
end
|
||||
assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083)
|
||||
error = assert_raise(RuntimeError) do
|
||||
Fiber.new(&Module.method(:undef_method)).resume(:to_s)
|
||||
end
|
||||
assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче