Skip to content

Commit

Permalink
Update Tokyo to use Base64 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed May 9, 2009
1 parent c093a88 commit ddd47c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/moneta/rufus.rb
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions lib/moneta/tyrant.rb
Expand Up @@ -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

Expand Down

0 comments on commit ddd47c5

Please sign in to comment.