Permalink
Browse files

Update Tokyo to use Base64 encoding

  • Loading branch information...
1 parent c093a88 commit ddd47c5c4dd06673ed95bb14c9ff8edce107b015 @wycats committed May 9, 2009
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/moneta/rufus.rb
  2. +2 −2 lib/moneta/tyrant.rb
View
@@ -20,12 +20,12 @@ def key?(key)
def [](key)
if val = super
- Marshal.load(val)
+ Marshal.load(val.unpack("m")[0])
end
end
def []=(key, value)
- super(key, Marshal.dump(value))
+ super(key, [Marshal.dump(value)].pack("m"))
end
end
View
@@ -22,12 +22,12 @@ def key?(key)
def [](key)
if val = super
- Marshal.load(val)
+ Marshal.load(val.unpack("m")[0])
end
end
def []=(key, value)
- super(key, Marshal.dump(value))
+ super(key, [Marshal.dump(value)].pack("m"))
end
end

1 comment on commit ddd47c5

Hi,

the latest rufus-tokyo (0.1.13) should remove the need for Base64 : http://jmettraux.wordpress.com/2009/06/02/rufus-tokyo-0-1-13/

Cheers.

Please sign in to comment.