lib/amqp/client/properties.rb in amqp-client-0.2.3 vs lib/amqp/client/properties.rb in amqp-client-0.3.0

- old
+ new

@@ -67,10 +67,11 @@ arr << reply_to.bytesize << reply_to fmt << "Ca*" end if expiration - expiration.is_a?(String) || raise(ArgumentError, "expiration must be a string") + expiration = expiration.to_s if expiration.is_a?(Integer) + expiration.is_a?(String) || raise(ArgumentError, "expiration must be a string or integer") flags |= (1 << 8) arr << expiration.bytesize << expiration fmt << "Ca*" end