Sha256: 092fcf60f61087c99d93a475072923a3896d6d8994cd4e84846260cae38b3a25

Contents?: true

Size: 368 Bytes

Versions: 19

Compression:

Stored size: 368 Bytes

Contents

# frozen_string_literal: true

def patch_json?
  require 'json'

  ::Gem::Version.new(RUBY_VERSION) >= ::Gem::Version.new('2.7') &&
    ::Gem::Version.new(JSON::VERSION) < ::Gem::Version.new('2')
rescue ::LoadError
  false
end

if patch_json?
  module JSON
    module_function

    def parse(source, opts = {})
      Parser.new(source, **opts).parse
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
eac_rails_utils-0.23.1 config/initializers/json.rb
eac_rails_utils-0.23.0 config/initializers/json.rb
eac_rails_utils-0.22.3 config/initializers/json.rb
eac_rails_utils-0.22.2 config/initializers/json.rb
eac_rails_utils-0.22.1 config/initializers/json.rb
eac_rails_utils-0.22.0 config/initializers/json.rb
eac_rails_utils-0.21.0 config/initializers/json.rb
eac_rails_utils-0.20.0 config/initializers/json.rb
eac_rails_utils-0.19.0 config/initializers/json.rb
eac_rails_utils-0.18.0 config/initializers/json.rb
eac_rails_utils-0.17.2 config/initializers/json.rb
eac_rails_utils-0.17.1 config/initializers/json.rb
eac_rails_utils-0.17.0 config/initializers/json.rb
eac_rails_utils-0.16.0 config/initializers/json.rb
eac_rails_utils-0.15.2 config/initializers/json.rb
eac_rails_utils-0.15.1 config/initializers/json.rb
eac_rails_utils-0.15.0 config/initializers/json.rb
eac_rails_utils-0.14.1 config/initializers/json.rb
eac_rails_utils-0.14.0 config/initializers/json.rb