mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
B #-: Allow yaml aliases expl. with new psych
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
3fd789c952
commit
2a0cb3fd23
@ -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…
x
Reference in New Issue
Block a user