Skip to content

Commit f0eb333

Browse files
committed
fix JSON check
1 parent aa48ac6 commit f0eb333

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.5.2 (2010-03-03)
2+
3+
* Bugfix: JSON check was crazy.
4+
15
## 1.5.1 (2010-03-03)
26

37
* `Job.destroy` and `Resque.dequeue` return the # of destroyed jobs.

lib/resque/helpers.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ def decode(object)
2121
return unless object
2222

2323
if defined? Yajl
24-
Yajl::Parser.parse(object, :check_utf8 => false)
24+
begin
25+
Yajl::Parser.parse(object, :check_utf8 => false)
26+
rescue Yajl::ParseError
27+
end
2528
else
2629
begin
2730
JSON.parse(object)
2831
rescue JSON::ParserError
29-
logger.error "#{$!}"
3032
end
3133
end
3234
end

0 commit comments

Comments
 (0)