1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_settracefunc.rb (TestSetTraceFunc): ensure to use

method_added hook defined in Module.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-02-11 23:03:21 +00:00
parent 68ef047b8f
commit 7dea05dc6f
2 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Sat Feb 12 08:03:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/ruby/test_settracefunc.rb (TestSetTraceFunc): ensure to use
method_added hook defined in Module.
Sat Feb 12 01:04:02 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby.c (proc_options): enable rubygems if --gem option is given.

View file

@ -54,9 +54,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["line", 4, __method__, self.class],
events.shift)
assert_equal(["c-call", 4, :method_added, Module],
assert_equal(["c-call", 4, :method_added, self.class],
events.shift)
assert_equal(["c-return", 4, :method_added, Module],
assert_equal(["c-return", 4, :method_added, self.class],
events.shift)
assert_equal(["line", 7, __method__, self.class],
events.shift)
@ -147,9 +147,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["line", 4, __method__, self.class],
events.shift)
assert_equal(["c-call", 4, :method_added, Module],
assert_equal(["c-call", 4, :method_added, self.class],
events.shift)
assert_equal(["c-return", 4, :method_added, Module],
assert_equal(["c-return", 4, :method_added, self.class],
events.shift)
assert_equal(["line", 8, __method__, self.class],
events.shift)
@ -191,9 +191,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["line", 4, __method__, self.class],
events.shift)
assert_equal(["c-call", 4, :method_added, Module],
assert_equal(["c-call", 4, :method_added, self.class],
events.shift)
assert_equal(["c-return", 4, :method_added, Module],
assert_equal(["c-return", 4, :method_added, self.class],
events.shift)
assert_equal(["line", 8, __method__, self.class],
events.shift)
@ -366,4 +366,8 @@ class TestSetTraceFunc < Test::Unit::TestCase
set_trace_func(func)
assert_equal(self, ok, bug3921)
end
class << self
define_method(:method_added, Module.method(:method_added))
end
end