aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/numeric_ext_test.rb
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2017-01-19 11:28:26 +0100
committerJean Boussier <jean.boussier@gmail.com>2017-01-19 15:24:41 +0100
commitb9bda7fd891147a0bc0cffa6dd9d15601be8b472 (patch)
treece46f94411b5582ed16b62f64c4d8ef69d04ead9 /activesupport/test/core_ext/numeric_ext_test.rb
parent190b82aee815175c407bf6978a100321df2249f0 (diff)
downloadrails-b9bda7fd891147a0bc0cffa6dd9d15601be8b472.tar.gz
rails-b9bda7fd891147a0bc0cffa6dd9d15601be8b472.tar.bz2
rails-b9bda7fd891147a0bc0cffa6dd9d15601be8b472.zip
Allocation free Integer#to_s
Diffstat (limited to 'activesupport/test/core_ext/numeric_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/numeric_ext_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb
index 5f86bf97c8..3cfbe6e7e6 100644
--- a/activesupport/test/core_ext/numeric_ext_test.rb
+++ b/activesupport/test/core_ext/numeric_ext_test.rb
@@ -394,6 +394,10 @@ class NumericExtFormattingTest < ActiveSupport::TestCase
assert_equal "1000010.0", BigDecimal("1000010").to_s
assert_equal "10000 10.0", BigDecimal("1000010").to_s("5F")
+
+ assert_raises TypeError do
+ 1.to_s({})
+ end
end
def test_in_milliseconds