lib/sidekiq/cron/support.rb in sidekiq-cron-1.9.0 vs lib/sidekiq/cron/support.rb in sidekiq-cron-1.9.1
- old
+ new
@@ -30,8 +30,16 @@
constant.const_get(name, false)
end
end
end
+
+ def self.load_yaml(src)
+ if Psych::VERSION > "4.0"
+ YAML.safe_load(src, permitted_classes: [Symbol], aliases: true)
+ else
+ YAML.load(src)
+ end
+ end
end
end
end