From d53877880835db241e1afeeb9bd6a8037c32e2fd Mon Sep 17 00:00:00 2001 From: Sebi Burkhard Date: Tue, 1 May 2012 11:28:46 +0700 Subject: JSON: encode BigDecimal NaN/Infinity as null. --- activesupport/test/json/encoding_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/test/json') 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 ', %("this is the \\u003Cstring\\u003E")], -- cgit v1.2.3