Sha256: 3d56c79f402dc5d43ef9a0b2a7abd4ddd006b71b7cd2d5b1d87063b66b04ea55

Contents?: true

Size: 251 Bytes

Versions: 9

Compression:

Stored size: 251 Bytes

Contents

# frozen_string_literal: true

TrueClass.class_eval do
  unless method_defined?(:to_i)
    # :nodoc:
    def to_i
      1
    end
  end
end

FalseClass.class_eval do
  unless method_defined?(:to_i)
    # :nodoc:
    def to_i
      0
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby-rails-extensions-1.1.1 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-1.1.1.pre.rc.1 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-0.2.0 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-0.2.0.pre.rc.1 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-1.1.0 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-1.1.0.pre.rc.1 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-0.1.0 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-1.0.0 lib/ruby-rails-extensions/extensions/to_i.rb
ruby-rails-extensions-1.0.0.pre.rc.1 lib/ruby-rails-extensions/extensions/to_i.rb