Sha256: c207eca928f5e46f1ba207bdabcc783ae478cc32571909b379dedbd368b51463

Contents?: true

Size: 473 Bytes

Versions: 14

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module CoreExt
    module Psych
      module SafeLoadFile
        def safe_load_file(filename, **kwargs)
          File.open(filename, "r:bom|utf-8") do |f|
            if RUBY_VERSION.start_with?("2.5")
              safe_load f, kwargs[:permitted_classes], [], false, filename
            else
              safe_load f, filename: filename, **kwargs
            end
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bridgetown-core-1.0.0.alpha6 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-1.0.0.alpha5 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.5 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-1.0.0.alpha4 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-1.0.0.alpha3 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-1.0.0.alpha2 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-1.0.0.alpha1 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.4 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.3 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.2 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.1 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.0 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.0.beta4 lib/bridgetown-core/core_ext/psych.rb
bridgetown-core-0.21.0.beta3 lib/bridgetown-core/core_ext/psych.rb