Skip to content

Commit

Permalink
fix for Ruby 1.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
saadiq authored and jtzemp committed Nov 4, 2009
1 parent 14b0f9a commit a36d506
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
== 0.1.1 2009-11-4

* Ruby 1.9 compatible thx to Saadiq Rodgers-King

== 0.1.0 2008-10-04

* 1 major enhancement:
Expand Down
4 changes: 4 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Base62 monkeypatches Integer to add an Integer#base62_encode instance method to

* sudo gem install base62

== THANKS:

* Saadiq Rodgers-King (http://github.com/saadiq) for making it work with Ruby 1.9

== LICENSE:

(The MIT License)
Expand Down
2 changes: 1 addition & 1 deletion lib/base62.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def base62_decode


class Integer
BASE62_PRIMITIVES = (0..9).collect { |i| i.to_s } + ('A'..'Z').collect + ('a'..'z').collect
BASE62_PRIMITIVES = (0..9).collect { |i| i.to_s } + ('A'..'Z').to_a + ('a'..'z').to_a

def base62_encode
number = self
Expand Down
2 changes: 1 addition & 1 deletion lib/base62/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Base62
module VERSION #:nodoc:
MAJOR = 0
MINOR = 1
TINY = 0
TINY = 1

STRING = [MAJOR, MINOR, TINY].join('.')
self
Expand Down

0 comments on commit a36d506

Please sign in to comment.