lib/hashie/extensions/parsers/yaml_erb_parser.rb in hashie-3.5.7 vs lib/hashie/extensions/parsers/yaml_erb_parser.rb in hashie-3.6.0
- old
+ new
@@ -1,7 +1,9 @@
require 'yaml'
require 'erb'
+require 'pathname'
+
module Hashie
module Extensions
module Parsers
class YamlErbParser
def initialize(file_path)
@@ -10,10 +12,10 @@
end
def perform
template = ERB.new(@content)
template.filename = @file_path
- YAML.load template.result
+ YAML.safe_load template.result
end
def self.perform(file_path)
new(file_path).perform
end