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



193
194
195
196
197
198
199
# File 'lib/bootsnap/compile_cache/yaml.rb', line 193

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