utils: check that the object is a hash when merging default_proc
Follow-up to #5026.
This commit is contained in:
parent
357e3621e2
commit
9278eb8fce
|
@ -302,16 +302,11 @@ module Jekyll
|
|||
|
||||
private
|
||||
def merge_default_proc(target, overwrite)
|
||||
if default_proc?(target) && default_proc?(overwrite) && target.default_proc.nil?
|
||||
if target.is_a?(Hash) && overwrite.is_a?(Hash) && target.default_proc.nil?
|
||||
target.default_proc = overwrite.default_proc
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def default_proc?(object)
|
||||
object.respond_to?(:default_proc)
|
||||
end
|
||||
|
||||
private
|
||||
def duplicate_frozen_values(target)
|
||||
target.each do |key, val|
|
||||
|
|
Loading…
Reference in New Issue