ohm 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ohm/redis.rb +5 -2
- data/lib/ohm.rb +0 -1
- metadata +2 -3
- data/lib/ohm/compat.rb +0 -12
data/lib/ohm/redis.rb
CHANGED
@@ -240,9 +240,12 @@ module Ohm
|
|
240
240
|
def format_bulk_reply(line)
|
241
241
|
bulklen = line.to_i
|
242
242
|
return nil if bulklen == -1
|
243
|
-
reply = @sock.read(bulklen)
|
243
|
+
reply = @sock.read(bulklen)
|
244
244
|
@sock.read(2) # Discard CRLF.
|
245
|
-
|
245
|
+
|
246
|
+
reply.respond_to?(:force_encoding) ?
|
247
|
+
reply.force_encoding("UTF-8") :
|
248
|
+
reply
|
246
249
|
end
|
247
250
|
|
248
251
|
def format_multi_bulk_reply(line)
|
data/lib/ohm.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Martens
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-10-
|
13
|
+
date: 2009-10-26 00:00:00 -03:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -25,7 +25,6 @@ extensions: []
|
|
25
25
|
extra_rdoc_files: []
|
26
26
|
|
27
27
|
files:
|
28
|
-
- lib/ohm/compat.rb
|
29
28
|
- lib/ohm/redis.rb
|
30
29
|
- lib/ohm/validations.rb
|
31
30
|
- lib/ohm.rb
|
data/lib/ohm/compat.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
# This file provides Ruby 1.8 compatibility. The intended functionality
|
4
|
-
# is not present, because we cannot guess the original encoding, thus
|
5
|
-
# making Iconv unsuitable for a conversion.
|
6
|
-
if RUBY_VERSION < "1.9"
|
7
|
-
class String
|
8
|
-
def force_encoding(encoding)
|
9
|
-
self
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|