Module: Bootsnap::CompileCache::YAML::Psych4

Extended by:
Psych4
Included in:
Psych4
Defined in:
lib/bootsnap/compile_cache/yaml.rb

Defined Under Namespace

Modules: Patch, SafeLoad, UnsafeLoad

Instance Method Summary collapse

Instance Method Details

#input_to_storage(contents, _) ⇒ Object



142
143
144
145
146
147
148
# File 'lib/bootsnap/compile_cache/yaml.rb', line 142

def input_to_storage(contents, _)
  obj = SafeLoad.input_to_storage(contents, nil)
  if UNCOMPILABLE.equal?(obj)
    obj = UnsafeLoad.input_to_storage(contents, nil)
  end
  obj
end