lib/nats/io/msg.rb in nats-pure-2.2.1 vs lib/nats/io/msg.rb in nats-pure-2.3.0

- old
+ new

@@ -48,9 +48,11 @@ @nc.publish_msg(msg) end def inspect hdr = ", header=#{@header}" if @header - "#<NATS::Msg(subject: \"#{@subject}\", reply: \"#{@reply}\", data: #{@data.slice(0, 10).inspect}#{hdr})>" + dot = '...' if @data.length > 10 + dat = "#{data.slice(0, 10)}#{dot}" + "#<NATS::Msg(subject: \"#{@subject}\", reply: \"#{@reply}\", data: #{dat.inspect}#{hdr})>" end end end