Skip to content

Commit

Permalink
Fixing error in Ruby 1.8.
Browse files Browse the repository at this point in the history
gimite committed Sep 19, 2011
1 parent 0958cc0 commit 16781aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/web_socket.rb
Original file line number Diff line number Diff line change
@@ -302,7 +302,7 @@ def read_header()
def send_frame(opcode, payload, mask)
payload = force_encoding(payload.dup(), "ASCII-8BIT")
# Setting StringIO's encoding to ASCII-8BIT.
buffer = StringIO.new("".force_encoding("ASCII-8BIT"))
buffer = StringIO.new(force_encoding("", "ASCII-8BIT"))
write_byte(buffer, 0x80 | opcode)
masked_byte = mask ? 0x80 : 0x00
if payload.bytesize <= 125

0 comments on commit 16781aa

Please sign in to comment.