Navigation Menu

Skip to content

Commit

Permalink
Force MaskedString#getbytes using encoding ASCII-8BIT, or else it wil…
Browse files Browse the repository at this point in the history
…l use the default encoding which may cause problem
  • Loading branch information
sishen committed Jan 12, 2012
1 parent ca98c11 commit 4e80500
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions em-websocket.gemspec
Expand Up @@ -21,9 +21,9 @@ Gem::Specification.new do |s|

s.add_dependency("eventmachine", ">= 0.12.9")
s.add_dependency("addressable", '>= 2.1.1')
s.add_development_dependency('em-spec', '~> 0.2.5')
s.add_development_dependency('em-spec', '~> 0.2.6')
s.add_development_dependency("eventmachine", "~> 0.12.10")
s.add_development_dependency('em-http-request', '~> 0.2.6')
s.add_development_dependency('rspec', "~> 2.6.0")
s.add_development_dependency('rspec', "~> 2.8.0")
s.add_development_dependency('rake')
end
2 changes: 1 addition & 1 deletion lib/em-websocket/masking04.rb
Expand Up @@ -29,7 +29,7 @@ def getbyte(index)
end

def getbytes(start_index, count)
data = ''
data = ''.force_encoding('ASCII-8BIT')
count.times do |i|
data << getbyte(start_index + i)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/em-websocket/version.rb
@@ -1,5 +1,5 @@
module EventMachine
module Websocket
VERSION = "0.3.6"
VERSION = "0.3.7"
end
end

0 comments on commit 4e80500

Please sign in to comment.