Permalink
Browse files

Force MaskedString#getbytes using encoding ASCII-8BIT, or else it wil…

…l use the default encoding which may cause problem
  • Loading branch information...
1 parent ca98c11 commit 4e80500df62db0e50bda8e5d06d70b7d4c8979b7 @sishen sishen committed Jan 12, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 em-websocket.gemspec
  2. +1 −1 lib/em-websocket/masking04.rb
  3. +1 −1 lib/em-websocket/version.rb
View
@@ -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
@@ -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
@@ -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.