Sha256: c36bd289c9898f847035c67e08e715fe9e977fd2c6ac97b69575377229fdc31c

Contents?: true

Size: 407 Bytes

Versions: 16

Compression:

Stored size: 407 Bytes

Contents

require "bigdecimal"

unless BigDecimal.method_defined?(:to_d)
  BigDecimal.class_eval do
    def to_d #:nodoc:
      self
    end
  end
end

unless Bignum.method_defined?(:to_d)
  Bignum.class_eval do
    def to_d #:nodoc:
      BigDecimal.new(self.to_s)
    end
  end
end

unless Fixnum.method_defined?(:to_d)
  Fixnum.class_eval do
    def to_d #:nodoc:
      BigDecimal.new(self.to_s)
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
activerecord-oracle_enhanced-adapter-1.5.1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.5.0 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.5.0.rc1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.5.0.beta1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.4.3 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.4.3.rc2 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.4.3.rc1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-with-schema-0.0.2 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-with-schema-0.0.1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.4.2 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.4.2.rc2 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
pmacs-activerecord-oracle_enhanced-adapter-1.4.2.rc1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.4.2.rc1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
ctreatma-activerecord-oracle_enhanced-adapter-1.4.1.2 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
ctreatma-activerecord-oracle_enhanced-adapter-1.4.1.1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
activerecord-oracle_enhanced-adapter-1.4.1 lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb