aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rational.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-30 05:48:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-30 05:48:28 +0000
commita4a9a96f1339d97446c0b93419c393217ca8812f (patch)
tree4a0ad8aad62209a1a00a039f07ef1afff3859ef9 /test/ruby/test_rational.rb
parentb6b5e13ee91573b2d02d1cf6bdc721b56118b398 (diff)
downloadruby-a4a9a96f1339d97446c0b93419c393217ca8812f.tar.gz
force fixable
* complex.c (nucomp_hash): force hash values fixable. [ruby-core:85224] [Bug #14420] * rational.c (nurat_hash): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rational.rb')
-rw-r--r--test/ruby/test_rational.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb
index 5ca5478f24..74fbbb49ec 100644
--- a/test/ruby/test_rational.rb
+++ b/test/ruby/test_rational.rb
@@ -42,7 +42,9 @@ class Rational_Test < Test::Unit::TestCase
end
def test_hash
- assert_kind_of(Integer, Rational(1,2).hash)
+ h = Rational(1,2).hash
+ assert_kind_of(Integer, h)
+ assert_nothing_raised {h.to_s}
h = {}
h[Rational(0)] = 0