Sha256: 1f7b811f49220c07594c2af534c0150066cccadc94688f0faa9ecc677b752484
Contents?: true
Size: 359 Bytes
Versions: 56
Compression:
Stored size: 359 Bytes
Contents
class Hash def to_json #:nodoc: returning result = '{' do result << map do |key, value| key = ActiveSupport::JSON::Variable.new(key.to_s) if ActiveSupport::JSON.can_unquote_identifier?(key) "#{ActiveSupport::JSON.encode(key)}: #{ActiveSupport::JSON.encode(value)}" end * ', ' result << '}' end end end
Version data entries
56 entries across 56 versions & 1 rubygems