Skip to content

Commit 6e3c88a

Browse files
michaeldwandefunkt
authored andcommitted
Converting JSON(..) => object.to_json/JSON.parse(..) in order to work with the JSON gem
1 parent e0c3249 commit 6e3c88a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/resque/helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def encode(object)
1212
if defined? Yajl
1313
Yajl::Encoder.encode(object)
1414
else
15-
JSON(object)
15+
object.to_json
1616
end
1717
end
1818

@@ -23,7 +23,7 @@ def decode(object)
2323
if defined? Yajl
2424
Yajl::Parser.parse(object, :check_utf8 => false)
2525
else
26-
JSON(object)
26+
JSON.parse(object)
2727
end
2828
end
2929

0 commit comments

Comments
 (0)