aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
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
commit3ccecb637da59ece28e38dbd20025588f83429ab (patch)
treebe58a9574c2de904c7ffe737eae4d505b36eb165 /test/ruby
parent1ec7cd79d2d258a1edcef085e662425dfea76e67 (diff)
downloadruby-3ccecb637da59ece28e38dbd20025588f83429ab.tar.gz
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/ruby')
-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