We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Adds constants for determining the minimum and maximum values of integers
Homepage: http://www.pluginaweek.org
Clone URL: git://github.com/pluginaweek/integer_limits.git
name age message
file .gitignore Fri Jul 04 15:48:39 -0700 2008 Ignore test/app_root/script [obrie]
file CHANGELOG.rdoc Sun Dec 14 18:41:47 -0800 2008 Tag 0.1.0 release [obrie]
file LICENSE Wed Jun 25 20:23:38 -0700 2008 Rename MIT-LICENSE to LICENSE [obrie]
file README.rdoc Wed Jun 25 21:37:41 -0700 2008 Update list of plugin resources to GitHub/Light... [obrie]
file Rakefile Sun Dec 14 18:41:47 -0800 2008 Tag 0.1.0 release [obrie]
file init.rb Sat Sep 22 19:40:45 -0700 2007 Move into the public repository [obrie]
directory lib/ Sun Dec 14 18:41:20 -0800 2008 Remove the PluginAWeek namespace [obrie]
directory test/ Sat Sep 22 19:40:45 -0700 2007 Move into the public repository [obrie]
README.rdoc

integer_limits

integer_limits adds constants for determining the minimum and maximum values of integers.

Resources

API

Bugs

Development

Source

  • git://github.com/pluginaweek/integer_limits.git

Description

Unfortunately, Ruby only provides constants for the minimum and maximum values of floats. This plugins adds additional constants for Integer classes, specifically Fixnum and Bignum, that gives you the ability to find the minimum and maximum values.

Usage

Fixnum

On 32-bit systems:

  >> Fixnum::MIN
  => -1073741824
  >> Fixnum::MAX
  => 1073741823

On 64-bit systems:

  >> Integer::MIN
  => -4611686018427387904
  >> Integer::MAX
  => 4611686018427387903

Bignum

  >> Bignum::MIN
  => -Infinity
  >> Bignum::MAX
  => Infinity

References