diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-13 07:48:58 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-13 07:48:58 +0000 |
commit | 602edc0c11bc1f40cadee87c5df2ade81ef44d2c (patch) | |
tree | 302a5102d61a0187407ba32fb5c5586304e3c84c /test | |
parent | 485267354273fc2ca2c9b1f22e39c5f1f414f4ca (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_1@50284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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) |