1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib
Prathamesh Sonpatki 8776f15b44
Fix an issue with JSON encoding of "Infinity" and "NaN" values
- When `as_json` returns `Infinity` or `NaN` as the value of any of the key,
  we don't used to call `as_json` on it as it was treated as primitive.
- This used to pass `Infinity` or `NaN` to `JSON.generate` and Ruby used
  to throw an error for `Infinity/NaN not allowed in JSON.`
- This patch changes the code to call `as_json` on these primitives so
  that they are converted to proper values before being passed to
  `JSON.generate`.
- Fixes #26877.
2016-10-30 20:08:55 +05:30
..
active_support Fix an issue with JSON encoding of "Infinity" and "NaN" values 2016-10-30 20:08:55 +05:30
active_support.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00