mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
B #-: Add aliases:true for newer psych (#2507)
https://bugs.ruby-lang.org/issues/17866 https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias
This commit is contained in:
parent
9a3c11c1f4
commit
61f254bd5a
@ -41,7 +41,11 @@ module OneCfg::Config::Type
|
||||
def load(name = @name)
|
||||
reset
|
||||
|
||||
@content = YAML.load_file(name)
|
||||
if Gem::Version.new(Psych.const_get(:VERSION)) >= Gem::Version.new('4.0')
|
||||
@content = YAML.load_file(name, aliases: true)
|
||||
else
|
||||
@content = YAML.load_file(name)
|
||||
end
|
||||
|
||||
@content
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user