summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-26 20:21:34 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-26 20:21:34 +0000
commit47447b1fa8050c0adf632e83d2e923481ee1ffc2 (patch)
tree1c8188fd5a19fa29188a1e1edf3f345913d3d5e1 /test/ruby
parentf5f6aa94bed2afcd0b9da757bc65184dcb5a2b0b (diff)
downloadruby-47447b1fa8050c0adf632e83d2e923481ee1ffc2.tar.gz
ruby-47447b1fa8050c0adf632e83d2e923481ee1ffc2.tar.xz
ruby-47447b1fa8050c0adf632e83d2e923481ee1ffc2.zip
* eval.c (mnew): call of super via a method object should work again.
[ruby-talk:248647], Thanks Calamitas. * test/ruby/test_method.rb (TestMethod::test_method_super): test for above fix. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_6@12391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_method.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index c30705cb1..ef28098dc 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -11,8 +11,13 @@ class TestMethod < Test::Unit::TestCase
class Base
def foo() :base end
+ def bar() :bar end
+ end
+ module SuperBar
+ def bar() super end
end
class Derived < Base
+ include SuperBar
def foo() :derived end
end
@@ -39,4 +44,10 @@ class TestMethod < Test::Unit::TestCase
um.bind(Base.new)
end
end
+
+ def test_method_super
+ assert_nothing_raised do
+ assert_equal(:bar, Derived.new.method(:bar).call)
+ end
+ end
end