aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb
blob: e7d33855c45a97c510a93d7dc587c0ffb41ad322 (plain) (tree)
1
2
3
4
5
6
7
8
9

                             



                           
                                               
                                    
                                                                  





             
# frozen_string_literal: true

module ActiveRecord
  module ConnectionAdapters
    module PostgreSQL
      module OID # :nodoc:
        class Decimal < Type::Decimal # :nodoc:
          def infinity(options = {})
            BigDecimal("Infinity") * (options[:negative] ? -1 : 1)
          end
        end
      end
    end
  end
end