mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit/assertions.rb: don't define assert_not_* if already
overridden. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f252633804
commit
0f82f65cee
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Feb 27 22:09:24 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/test/unit/assertions.rb: don't define assert_not_* if already
|
||||
overridden.
|
||||
|
||||
Fri Feb 27 22:02:34 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* util.c: fix SEGV by test_time.rb with
|
||||
|
|
|
@ -122,8 +122,10 @@ EOT
|
|||
super if !caller[0].rindex(MiniTest::MINI_DIR, 0) || !obj.respond_to?(meth)
|
||||
end
|
||||
|
||||
instance_methods(true).grep(/\Arefute_/) do |m|
|
||||
alias_method(('assert_not_' << m.to_s[/.*?_(.*)/, 1]), m)
|
||||
ms = instance_methods(true).map {|sym| sym.to_s }
|
||||
ms.grep(/\Arefute_/) do |m|
|
||||
mname = ('assert_not_' << m.to_s[/.*?_(.*)/, 1])
|
||||
alias_method(mname, m) unless ms.include? mname
|
||||
end
|
||||
|
||||
def build_message(head, template=nil, *arguments)
|
||||
|
|
Loading…
Add table
Reference in a new issue