Skip to content

Commit

Permalink
Turned Array::Packer::BASE_64_B2A into an array.
Browse files Browse the repository at this point in the history
Previously this was a hash with keys 0..63 -- we didn't actually need
the hash table behaviour.
  • Loading branch information
tilman2 committed Mar 28, 2009
1 parent 810e724 commit e3f8e9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/common/pack.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# depends on: array.rb string.rb hash.rb range.rb

class Array::Packer
BASE_64_B2A = {}
BASE_64_B2A = Array.new 64
(00..25).each {|x| BASE_64_B2A[x] = (?A + x - 00).chr}
(26..51).each {|x| BASE_64_B2A[x] = (?a + x - 26).chr}
(52..61).each {|x| BASE_64_B2A[x] = (?0 + x - 52).chr}
Expand Down

0 comments on commit e3f8e9f

Please sign in to comment.