Module: Bootsnap::CompileCache::YAML::Psych3::Patch
- Defined in:
- lib/bootsnap/compile_cache/yaml.rb
Instance Method Summary collapse
Instance Method Details
#load_file(path, *args) ⇒ Object
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/bootsnap/compile_cache/yaml.rb', line 299 def load_file(path, *args) return super unless CompileCache::YAML.supported_internal_encoding? return super if args.size > 1 if (kwargs = args.first) return super unless kwargs.is_a?(Hash) return super unless (kwargs.keys - CompileCache::YAML.).empty? end CompileCache::Native.fetch( CompileCache::YAML.cache_dir, nil, File.realpath(path), CompileCache::YAML::Psych3, kwargs, ) end |
#unsafe_load_file(path, *args) ⇒ Object
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/bootsnap/compile_cache/yaml.rb', line 320 def unsafe_load_file(path, *args) return super unless CompileCache::YAML.supported_internal_encoding? return super if args.size > 1 if (kwargs = args.first) return super unless kwargs.is_a?(Hash) return super unless (kwargs.keys - CompileCache::YAML.).empty? end CompileCache::Native.fetch( CompileCache::YAML.cache_dir, nil, File.realpath(path), CompileCache::YAML::Psych3, kwargs, ) end |