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
oj-3.12.3 test/json_gem/test_helper.rb
oj-3.12.2 test/json_gem/test_helper.rb
oj-3.12.1 test/json_gem/test_helper.rb
oj-3.12.0 test/json_gem/test_helper.rb
oj-3.11.8 test/json_gem/test_helper.rb
oj-3.11.7 test/json_gem/test_helper.rb
oj-3.11.6 test/json_gem/test_helper.rb
oj-3.11.5 test/json_gem/test_helper.rb
oj-3.11.4 test/json_gem/test_helper.rb
oj-3.11.3 test/json_gem/test_helper.rb
oj-3.11.2 test/json_gem/test_helper.rb
oj-3.11.1 test/json_gem/test_helper.rb