summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 15:41:32 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 15:41:32 +0000
commit54dc1cf1eda9afac1c43fd21cd077ac216f75730 (patch)
tree1634b813a4a0c4043d7701b1d0ee749d646416e6 /test
parent91ad9122a51d795b1267191ec0e40a3e910dbe11 (diff)
merge revision(s) 49867: [Backport #10847] [Backport #10970]
* vm_eval.c (vm_call_super): search next super class from the original class, to get rid of infinite recursion with prepending. a patch by Seiei Higa <hanachin AT gmail.com> at [ruby-core:68434]. [ruby-core:68093] [Bug #10847] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_module.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 6d08bf6c00..2f3e5c2ae2 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1725,6 +1725,17 @@ class TestModule < Test::Unit::TestCase
assert_equal('hello!', foo.new.hello, bug9236)
end
+ def test_prepend_call_super
+ assert_separately([], <<-'end;') #do
+ bug10847 = '[ruby-core:68093] [Bug #10847]'
+ module M; end
+ Float.prepend M
+ assert_nothing_raised(SystemStackError, bug10847) do
+ 0.3.numerator
+ end
+ end;
+ end
+
def test_class_variables
m = Module.new
m.class_variable_set(:@@foo, 1)