lib/review/catalog.rb in review-5.3.0 vs lib/review/catalog.rb in review-5.4.0
- old
+ new
@@ -2,14 +2,14 @@
require 'date'
module ReVIEW
class Catalog
def initialize(file)
- if file.respond_to?(:read)
- @yaml = YAML.safe_load(file.read, [Date])
- else ## as Object
- @yaml = file
- end
+ @yaml = if file.respond_to?(:read)
+ YAMLLoader.safe_load(file.read)
+ else ## as Object
+ file
+ end
@yaml ||= {}
end
def predef
@yaml['PREDEF'] || []