aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_float.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 01:29:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 01:29:57 +0000
commit114d1751dc8173ec283b2ab5ea8096e799be2c39 (patch)
tree7de085299269a93eb8369692af9b972a741d8752 /test/ruby/test_float.rb
parent0adce993578ca4c40afbbc04c5f4679561bd7861 (diff)
downloadruby-114d1751dc8173ec283b2ab5ea8096e799be2c39.tar.gz
numeric.c: allow nil as rounding mode option
* numeric.c (rb_num_get_rounding_option): allow nil same as the default behavior, per [ruby-core:77961]. [Bug #12548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r--test/ruby/test_float.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index eccc86740a..5a566879b7 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -723,8 +723,8 @@ class TestFloat < Test::Unit::TestCase
end
def test_round_half_invalid
- assert_raise_with_message(ArgumentError, /nil/) {
- 1.0.round(half: nil)
+ assert_raise_with_message(ArgumentError, /Object/) {
+ 1.0.round(half: Object)
}
assert_raise_with_message(ArgumentError, /xxx/) {
1.0.round(half: "\0xxx")