lib/cucumber/wire_support/wire_packet.rb in cucumber-0.5.2 vs lib/cucumber/wire_support/wire_packet.rb in cucumber-0.5.3

- old
+ new

@@ -12,15 +12,17 @@ end end attr_reader :message, :params - def initialize(message, params) + def initialize(message, params = nil) @message, @params = message, params end def to_json - [@message, @params].to_json + packet = [@message] + packet << @params if @params + packet.to_json end def handle_with(handler) handler.send("handle_#{@message}", @params) end