summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_method.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 33e7436e6eb..fff484db730 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -1084,3 +1084,22 @@ assert_equal '[1, [:foo, 3, 4, :foo]]', %q{
a = b = [:foo]
regular(1, *a, *[3, 4], *b)
}
+
+assert_equal '["B", "A"]', %q{
+ class A
+ def m
+ 'A'
+ end
+ end
+
+ class B < A
+ define_method(:m) do
+ ['B', super()]
+ end
+ end
+
+ class C < B
+ end
+
+ C.new.m
+}