summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-13 14:08:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-13 14:08:03 +0000
commitba1ef74f05b255a072bcb27f3b818e391a7be9ac (patch)
treebe58a9574c2de904c7ffe737eae4d505b36eb165 /test
parent85512bdbde6f23334b4c20201b53539217518770 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_float.rb17
1 files changed, 17 insertions, 0 deletions
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