Sha256: bf3e04a578957d79a63b88478120f026ee93cee70c6ffbbd340253e79c02f4c4

Contents?: true

Size: 358 Bytes

Versions: 73

Compression:

Stored size: 358 Bytes

Contents

class Fixnum
  # Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Fixnum.html]
  def div(n)
    (self / n).to_i
  end unless method_defined? :div

  # Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Fixnum.html]
  def fdiv(n)
    to_f / n
  end unless method_defined? :fdiv
end

Version data entries

73 entries across 73 versions & 3 rubygems

Version Path
marcandre-backports-1.8.0 lib/backports/1.8.7/fixnum.rb
marcandre-backports-1.8.1 lib/backports/1.8.7/fixnum.rb
marcandre-backports-1.8.2 lib/backports/1.8.7/fixnum.rb
marcandre-backports-1.8.3 lib/backports/1.8.7/fixnum.rb
marcandre-backports-1.8.4 lib/backports/1.8.7/fixnum.rb
marcandre-backports-1.9.0 lib/backports/1.8.7/fixnum.rb
backports-3.0.3 lib/backports/1.8.7/fixnum.rb
backports-3.0.2 lib/backports/1.8.7/fixnum.rb
backports-3.0.1 lib/backports/1.8.7/fixnum.rb
backports-3.0.0 lib/backports/1.8.7/fixnum.rb
backports-2.8.2 lib/backports/1.8.7/fixnum.rb
backports-2.8.1 lib/backports/1.8.7/fixnum.rb
backports-2.8.0 lib/backports/1.8.7/fixnum.rb
backports-2.7.1 lib/backports/1.8.7/fixnum.rb
backports-2.7.0 lib/backports/1.8.7/fixnum.rb
backports-2.6.7 lib/backports/1.8.7/fixnum.rb
backports-2.6.6 lib/backports/1.8.7/fixnum.rb
backports-2.6.5 lib/backports/1.8.7/fixnum.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/backports-2.6.4/lib/backports/1.8.7/fixnum.rb
backports-2.6.4 lib/backports/1.8.7/fixnum.rb