Sha256: 16b3b5439a4b10351d95363c840fd20aa648912b1933e2da9c750a193e973c6d

Contents?: true

Size: 696 Bytes

Versions: 32

Compression:

Stored size: 696 Bytes

Contents

# frozen_string_literal: true

$: << File.dirname(__FILE__)
$oj_dir = File.dirname(File.dirname(File.expand_path(File.dirname(__FILE__))))
%w(lib ext).each do |dir|
  $: << File.join($oj_dir, dir)
end

require 'test/unit'
REAL_JSON_GEM = !!ENV['REAL_JSON_GEM']

if ENV['REAL_JSON_GEM']
  require 'json'
else
  require 'oj'
  Oj.mimic_JSON

  if defined?(GC.verify_compaction_references) == 'method'
    # This method was added in Ruby 3.0.0. Calling it this way asks the GC to
    # move objects around, helping to find object movement bugs.
    GC.verify_compaction_references(double_heap: true, toward: :empty)
  end
end

NaN = JSON::NaN if defined?(JSON::NaN)
NaN = 0.0/0 unless defined?(NaN)

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/oj-3.13.2/test/json_gem/test_helper.rb
oj-3.13.18 test/json_gem/test_helper.rb
oj-3.13.17 test/json_gem/test_helper.rb
oj-3.13.16 test/json_gem/test_helper.rb
oj-3.13.15 test/json_gem/test_helper.rb
oj-3.13.14 test/json_gem/test_helper.rb
oj-3.13.13 test/json_gem/test_helper.rb
oj-3.13.12 test/json_gem/test_helper.rb
oj-3.13.11 test/json_gem/test_helper.rb
oj-3.13.10 test/json_gem/test_helper.rb
oj-3.13.9 test/json_gem/test_helper.rb
oj-3.13.8 test/json_gem/test_helper.rb
oj-3.13.7 test/json_gem/test_helper.rb
oj-3.13.6 test/json_gem/test_helper.rb
oj-3.13.5 test/json_gem/test_helper.rb
oj-3.13.4 test/json_gem/test_helper.rb
oj-3.13.3 test/json_gem/test_helper.rb
oj-3.13.2 test/json_gem/test_helper.rb
oj-3.13.1 test/json_gem/test_helper.rb
oj-3.13.0 test/json_gem/test_helper.rb