123456789_123456789_123456789_123456789_123456789_

Class: Float

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: activesupport/lib/active_support/core_ext/object/json.rb

Instance Method Summary

::ActiveSupport::NumericWithFormat - Prepended

Instance Method Details

#as_json(options = nil)

This method is for internal use only.

Encoding Infinity or NaN to JSON should return “null”. The default returns “Infinity” or “NaN” which are not valid JSON.

[ GitHub ]

  
# File 'activesupport/lib/active_support/core_ext/object/json.rb', line 121

def as_json(options = nil) # :nodoc:
  finite? ? self : nil
end