Skip to content
Browse files

Fixing error in Ruby 1.8.

  • Loading branch information...
1 parent 0958cc0 commit 16781aab10dd06279870211c4db435b8ec3b1056 @gimite committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/web_socket.rb
View
2 lib/web_socket.rb
@@ -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.
Something went wrong with that request. Please try again.