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
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/bootsnap/compile_cache/yaml.rb', line 225 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
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/bootsnap/compile_cache/yaml.rb', line 246 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 |