From 3ccecb637da59ece28e38dbd20025588f83429ab Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 13 Aug 2016 14:08:03 +0000 Subject: numeric.c: infinite recursion * numeric.c (num_funcall0, num_funcall1): get rid of infinite recursion in fallback methods of Numeric. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_float.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 2684cd8eab..b31c0415f2 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -793,4 +793,21 @@ class TestFloat < Test::Unit::TestCase h = {0.0 => bug10979} assert_equal(bug10979, h[-0.0]) end + + def test_aliased_quo_recursion + assert_separately([], "#{<<-"begin;"}\n#{<<-"end;"}") + begin; + class Float + $VERBOSE = nil + alias / quo + end + assert_raise(NameError) do + begin + 1.0/2.0 + rescue SystemStackError => e + raise SystemStackError, e.message + end + end + end; + end end -- cgit v1.2.3