Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoiding conflict with json gem by defining Encoding class in Ruby 1.8.

  • Loading branch information...
commit 6e9139ffc9f78b78d6af83570c231778e41a5afd 1 parent bb837ef
@gimite authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/web_socket.rb
View
8 lib/web_socket.rb
@@ -8,6 +8,14 @@
if RUBY_VERSION < "1.9.0"
+ class Encoding
+
+ def self.const_missing(name)
+ return Encoding.new()
+ end
+
+ end
+
class String
def force_encoding(encoding)
Please sign in to comment.
Something went wrong with that request. Please try again.