diff options
author | Sebi Burkhard <sebi.burkhard@gmail.com> | 2012-05-01 11:28:46 +0700 |
---|---|---|
committer | Sebi Burkhard <sebi.burkhard@gmail.com> | 2012-05-01 11:28:46 +0700 |
commit | d53877880835db241e1afeeb9bd6a8037c32e2fd (patch) | |
tree | 839f48eda4a54216b5591309199cedb300c2b8db /activesupport/test/json | |
parent | 3cc6995e714bc763b40eb3e1d710c1e5ded44384 (diff) | |
download | rails-d53877880835db241e1afeeb9bd6a8037c32e2fd.tar.gz rails-d53877880835db241e1afeeb9bd6a8037c32e2fd.tar.bz2 rails-d53877880835db241e1afeeb9bd6a8037c32e2fd.zip |
JSON: encode BigDecimal NaN/Infinity as null.
Diffstat (limited to 'activesupport/test/json')
-rw-r--r-- | activesupport/test/json/encoding_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index 8493f4dc2c..babacf4d3a 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -30,6 +30,7 @@ class TestJSONEncoding < ActiveSupport::TestCase [ 0.0/0.0, %(null) ], [ 1.0/0.0, %(null) ], [ -1.0/0.0, %(null) ], + [ BigDecimal('0.0')/BigDecimal('0.0'), %(null) ], [ BigDecimal('2.5'), %("#{BigDecimal('2.5').to_s}") ]] StringTests = [[ 'this is the <string>', %("this is the \\u003Cstring\\u003E")], |