Module: Bootsnap::CompileCache::YAML::Psych4::Patch
- Defined in:
- lib/bootsnap/compile_cache/yaml.rb
Instance Method Summary collapse
Instance Method Details
#load_file(path, *args) ⇒ Object
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/bootsnap/compile_cache/yaml.rb', line 271 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::Psych4::SafeLoad, kwargs, ) end |
#unsafe_load_file(path, *args) ⇒ Object
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/bootsnap/compile_cache/yaml.rb', line 292 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::Psych4::UnsafeLoad, kwargs, ) end |