lib/faye/websocket/hybi_parser.rb in faye-websocket-0.4.1 vs lib/faye/websocket/hybi_parser.rb in faye-websocket-0.4.2

- old
+ new

@@ -168,11 +168,11 @@ end if @masking mask = [rand(256), rand(256), rand(256), rand(256)] frame[header...offset] = mask - buffer = Mask.mask(buffer, mask) + buffer = WebSocketMask.mask(buffer, mask) end frame.concat(buffer) WebSocket.encode(frame) @@ -233,10 +233,10 @@ @length = integer(buffer) @stage = @masked ? 3 : 4 end def emit_frame - payload = @masked ? Mask.mask(@payload, @mask) : @payload + payload = @masked ? WebSocketMask.mask(@payload, @mask) : @payload case @opcode when OPCODES[:continuation] then return @socket.close(ERRORS[:protocol_error], nil, false) unless @mode @buffer.concat(payload)