Sha256: a1e51a4e6f2eed9c30668b2fdd147e7791371e5661b41423a1d1c93d145ef4db

Contents?: true

Size: 1.22 KB

Versions: 8

Compression:

Stored size: 1.22 KB

Contents

# frozen_string_literal: true
#
# Ubuntu does not accept arguments to ruby when called using env. To get warnings to show up the -w options is
# required. That can be set in the RUBYOPT environment variable.
# export RUBYOPT=-w

$VERBOSE = true

%w(lib ext test).each do |dir|
  $LOAD_PATH.unshift File.expand_path("../../#{dir}", __FILE__)
end

require 'minitest'
require 'minitest/autorun'
require 'stringio'
require 'date'
require 'bigdecimal'
require 'pp'
require 'oj'


def verify_gc_compaction
  # 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.
  if defined?(GC.verify_compaction_references) == 'method' && !(RbConfig::CONFIG['host_os'] =~ /(mingw|mswin)/)
    if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.2.0")
      GC.verify_compaction_references(expand_heap: true, toward: :empty)
    else
      GC.verify_compaction_references(double_heap: true, toward: :empty)
    end
  end
end


$ruby = RUBY_DESCRIPTION.split(' ')[0]
$ruby = 'ree' if 'ruby' == $ruby && RUBY_DESCRIPTION.include?('Ruby Enterprise Edition')

class Range
  def to_hash()
    { 'begin' => self.begin, 'end' => self.end, 'exclude_end' => self.exclude_end? }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
oj-3.14.2 test/helper.rb
oj-3.14.1 test/helper.rb
oj-3.14.0 test/helper.rb
oj-3.13.23 test/helper.rb
oj-3.13.22 test/helper.rb
oj-3.13.21 test/helper.rb
oj-3.13.20 test/helper.rb
oj-3.13.19 test/helper.rb