From 602edc0c11bc1f40cadee87c5df2ade81ef44d2c Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 13 Apr 2015 07:48:58 +0000 Subject: 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 at [ruby-core:68434]. [ruby-core:68093] [Bug #10847] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@50284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_module.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 050d17a5d3..9910e261d5 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1708,6 +1708,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) -- cgit v1.2.3