Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Ruby 1.9 support for the ruby client #49

Merged
merged 1 commit into from

2 participants

@acrosa

No description provided.

@rsumbaly rsumbaly merged commit 946e042 into voldemort:master
@rsumbaly
Collaborator

Thanks again! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 20, 2011
  1. Ruby 1.9 support to voldemort-rb

    Alejandro Crosa authored
This page is out of date. Refresh to see the latest.
Showing with 40 additions and 20 deletions.
  1. +40 −20 clients/ruby/lib/voldemort-serializer.rb
View
60 clients/ruby/lib/voldemort-serializer.rb
@@ -83,16 +83,26 @@ def write(object, type)
end
else
case(type)
- when 'string': bytes << write_string(object)
- when 'int8': bytes << write_int8(object)
- when 'int16': bytes << write_int16(object)
- when 'int32': bytes << write_int32(object)
- when 'int64': bytes << write_int64(object)
- when 'float32': bytes << write_float32(object)
- when 'float64': bytes << write_float64(object)
- when 'date': bytes << write_date(object)
- when 'bytes': bytes << write_bytes(object)
- when 'boolean': bytes << write_boolean(object)
+ when 'string'
+ bytes << write_string(object)
+ when 'int8'
+ bytes << write_int8(object)
+ when 'int16'
+ bytes << write_int16(object)
+ when 'int32'
+ bytes << write_int32(object)
+ when 'int64'
+ bytes << write_int64(object)
+ when 'float32'
+ bytes << write_float32(object)
+ when 'float64'
+ bytes << write_float64(object)
+ when 'date'
+ bytes << write_date(object)
+ when 'bytes'
+ bytes << write_bytes(object)
+ when 'boolean'
+ bytes << write_boolean(object)
else
# TODO throw unsupported type exception
end
@@ -329,16 +339,26 @@ def read(bytes, type)
return read_list(bytes, type)
else
case(type)
- when 'string': return read_bytes(bytes)
- when 'int8': return read_int8(bytes)
- when 'int16': return read_int16(bytes)
- when 'int32': return read_int32(bytes)
- when 'int64': return read_int64(bytes)
- when 'float32': return read_float32(bytes)
- when 'float64': return read_float64(bytes)
- when 'date': return read_date(bytes)
- when 'bytes': return read_bytes(bytes)
- when 'boolean': return read_boolean(bytes)
+ when 'string'
+ return read_bytes(bytes)
+ when 'int8'
+ return read_int8(bytes)
+ when 'int16'
+ return read_int16(bytes)
+ when 'int32'
+ return read_int32(bytes)
+ when 'int64'
+ return read_int64(bytes)
+ when 'float32'
+ return read_float32(bytes)
+ when 'float64'
+ return read_float64(bytes)
+ when 'date'
+ return read_date(bytes)
+ when 'bytes'
+ return read_bytes(bytes)
+ when 'boolean'
+ return read_boolean(bytes)
# TODO default throw unknown type exception
end
end
Something went wrong with that request. Please try again.