lib/gogyou/accessor.rb in gogyou-0.2.1 vs lib/gogyou/accessor.rb in gogyou-0.2.2
- old
+ new
@@ -88,11 +88,11 @@
nil
end
def inspect
"#<%s buffer=%p, offset=%p>" % [self.class,
- buffer__GOGYOU__,
+ buffer__GOGYOU__.inspect,
offset__GOGYOU__]
end
def pretty_print(q)
q.group(1, "#<#{self.class}") do
@@ -335,10 +335,10 @@
def self.aset(buffer, offset, value)
case value
when ::String
raise ArgumentError, "buffer size too small" unless value.bytesize < self::BYTESIZE
- buffer.setbinary(offset, value, self::BYTESIZE, 0)
+ buffer.setbinary(offset, value, 0, self::BYTESIZE)
when ::Array
raise NotImplementedError
when self::SUBTYPE
raise NotImplementedError
else