assertions.rb: fix return value
* lib/test/unit/assertions.rb (assert_throw): should return the caught value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
df7fc7ce1b
commit
42d491cd1b
@ -192,7 +192,7 @@ module Test
|
||||
# throw tag
|
||||
# end
|
||||
def assert_throw(tag, msg = nil)
|
||||
catch(tag) do
|
||||
ret = catch(tag) do
|
||||
begin
|
||||
yield(tag)
|
||||
rescue ArgumentError => e
|
||||
@ -205,6 +205,7 @@ module Test
|
||||
assert(false, msg)
|
||||
end
|
||||
assert(true)
|
||||
ret
|
||||
end
|
||||
|
||||
# :call-seq:
|
||||
|
Loading…
x
Reference in New Issue
Block a user