mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit/assertions.rb: use #__send__ instead of #send.
* lib/test/unit/testcase.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65f4f950fb
commit
b31aeea632
3 changed files with 11 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Nov 21 00:43:00 2003 Nathaniel Talbott <ntalbott@ruby-lang.org>
|
||||
|
||||
* lib/test/unit/assertions.rb: use #__send__ instead of #send.
|
||||
|
||||
* lib/test/unit/testcase.rb: ditto.
|
||||
|
||||
Thu Nov 20 19:19:22 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* configure.in: don't find the Cygwin's pthread library on MinGW.
|
||||
|
|
|
@ -156,8 +156,8 @@ EOT
|
|||
end
|
||||
|
||||
# Compares the two objects based on the passed
|
||||
# operator. Passes if object1.send(operator, object2) is
|
||||
# true.
|
||||
# operator. Passes if object1.__send__(operator, object2)
|
||||
# is true.
|
||||
public
|
||||
def assert_operator(object1, operator, object2, message="")
|
||||
_wrap_assertion do
|
||||
|
@ -168,7 +168,7 @@ EOT
|
|||
?
|
||||
<?>.
|
||||
EOT
|
||||
assert_block(full_message) { object1.send(operator, object2) }
|
||||
assert_block(full_message) { object1.__send__(operator, object2) }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -236,7 +236,7 @@ EOT
|
|||
end
|
||||
|
||||
UncaughtThrow = {NameError => /^uncaught throw \`(.+)\'$/,
|
||||
ThreadError => /^uncaught throw \`(.+)\' in thread /}
|
||||
ThreadError => /^uncaught throw \`(.+)\' in thread /} #`
|
||||
|
||||
# Passes if block throws symbol.
|
||||
public
|
||||
|
|
|
@ -67,7 +67,7 @@ module Test
|
|||
@_result = result
|
||||
begin
|
||||
setup
|
||||
send(@method_name)
|
||||
__send__(@method_name)
|
||||
rescue AssertionFailedError => e
|
||||
add_failure(e.message, e.backtrace)
|
||||
rescue StandardError, ScriptError
|
||||
|
|
Loading…
Reference in a new issue