Skip to content

Commit

Permalink
Better way to detect method present
Browse files Browse the repository at this point in the history
Thanks to @sferik for the catch
  • Loading branch information
davidakachaos committed May 31, 2013
1 parent d0002bd commit f3e5de7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delayed/backend/base.rb
Expand Up @@ -82,7 +82,7 @@ def payload_object=(object)
end

def payload_object
if YAML.methods.include?(:unsafe_load)
if YAML.respond_to?(:unsafe_load)
#See https://github.com/dtao/safe_yaml
#When the method is there, we need to load our YAML like this...
@payload_object ||= YAML.load(self.handler, :safe => false)
Expand Down

0 comments on commit f3e5de7

Please sign in to comment.