From 5fe5a24586ac9a698e0a9c8f0f6d4684e1d2609d Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sat, 22 May 2010 10:41:43 +0000 Subject: merge revision(s) 26534:26536: * eval.c (proc_invoke): reverted r25975. [ruby-dev:39931] [ruby-dev:40059] * eval.c (rb_mod_define_method): return original block but not bound block. [ruby-core:26984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@27954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_super.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test') diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb index a9d931c0ef..168bace449 100644 --- a/test/ruby/test_super.rb +++ b/test/ruby/test_super.rb @@ -149,4 +149,25 @@ class TestSuper < Test::Unit::TestCase c = C.new assert_equal([c, "#{C.to_s}::m"], c.m, bug2419) end + + module Bug2537 + class Parent + def run(a) + a + end + end + + class Child < Parent + def run(*a) + proc {super(*a)}.call + end + end + end + + def test_super_in_block_call + bug2537 = '[ruby-dev:39931]' + assert_nothing_raised(bug2537) do + assert_equal(bug2537, Bug2537::Child.new.run(bug2537), bug2537) + end + end end -- cgit v1.2.3