lib/websocket/handshake/base.rb in websocket-1.0.3 vs lib/websocket/handshake/base.rb in websocket-1.0.4

- old
+ new

@@ -23,9 +23,16 @@ # @return [String] text of response def to_s "" end + # Recreate inspect as #to_s was overwritten + def inspect + vars = self.instance_variables.map{|v| "#{v}=#{instance_variable_get(v).inspect}"}.join(", ") + insp = "#{self.class}:0x%08x" % (self.__id__ * 2) + "<#{insp} #{vars}>" + end + # Is parsing of data finished? # @return [Boolena] True if request was completely parsed or error occured. False otherwise def finished? @state == :finished || @state == :error end