summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-22 10:41:43 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-22 10:41:43 +0000
commit5fe5a24586ac9a698e0a9c8f0f6d4684e1d2609d (patch)
treead3d0872481a8aa61ba5a9aee33934fda4bfa371 /test
parent4fd8847d21a2c9bac43bd713a6a43ff3417ee45e (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_super.rb21
1 files changed, 21 insertions, 0 deletions
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