lib/appengine-apis/memcache.rb in appengine-apis-0.0.12 vs lib/appengine-apis/memcache.rb in appengine-apis-0.0.13

- old
+ new

@@ -431,11 +431,11 @@ private def memcache_key(obj) key = obj - key = key.to_s.to_java_string if key + key = java.lang.String.new(key.to_s) if key key end def memcache_value(obj) case obj @@ -448,14 +448,14 @@ when JavaProxy, Java::JavaObject obj else if obj.class == String # Convert plain strings to Java strings - obj.to_java_string + java.lang.String.new(obj) else bytes = Marshal.dump(obj).to_java_bytes - java.util.ArrayList.new([MARSHAL_MARKER.to_java_string, bytes]) + java.util.ArrayList.new([java.lang.String.new(MARSHAL_MARKER), bytes]) end end end def memcache_expiration(amount) @@ -500,12 +500,12 @@ def put(key, value, expiration, mode) check_write convert_exceptions do key = memcache_key(key) value = memcache_value(value) - expiriation = memcache_expiration(expiriation) - service.put(key, value, expiriation, mode) + expiration = memcache_expiration(expiration) + service.put(key, value, expiration, mode) end end def put_many(pairs, expiration, mode) check_write @@ -539,20 +539,20 @@ else key end @map[string_key] = key if string_key - string_key.to_java_string + java.lang.String.new(string_key) else string_key end end def java_keys @map.keys.collect do |key| if key - key.to_java_string + java.lang.String.new(key) else key end end end @@ -575,6 +575,6 @@ end hash end end end -end \ No newline at end of file +end