lib/faye/websocket/api.rb in faye-websocket-0.4.0 vs lib/faye/websocket/api.rb in faye-websocket-0.4.1

- old
+ new

@@ -55,10 +55,12 @@ end end return false if @ready_state == CLOSED + data = data.to_s unless Array === data + data = WebSocket.encode(data) if String === data frame = @parser.frame(data, type, error_type) @stream.write(frame) if frame end @@ -89,5 +91,6 @@ end end end end +