lib/dbus/marshall.rb in ruby-dbus-0.13.0 vs lib/dbus/marshall.rb in ruby-dbus-0.14.0
- old
+ new
@@ -131,12 +131,12 @@
packet = read(1).unpack("C")[0]
when Type::UINT16
align(2)
packet = read(2).unpack(@uint16)[0]
when Type::INT16
- align(4)
- packet = read(4).unpack(@uint16)[0]
+ align(2)
+ packet = read(2).unpack(@uint16)[0]
if (packet & 0x8000) != 0
packet -= 0x10000
end
when Type::UINT32, Type::UNIX_FD
align(4)
@@ -294,10 +294,10 @@
#
# Host native endianness is used, declared in Message#marshall
def append(type, val)
raise TypeException, "Cannot send nil" if val.nil?
- type = type.chr if type.is_a?(Fixnum)
+ type = type.chr if type.is_a?(Integer)
type = Type::Parser.new(type).parse[0] if type.is_a?(String)
case type.sigtype
when Type::BYTE
@packet += val.chr
when Type::UINT32, Type::UNIX_FD