Module: Parser2BenchmarkCommon

Includes:
JSON
Included in:
Parser2BenchmarkExt, Parser2BenchmarkPure
Defined in:
lib/vendor/json_pure/benchmarks/parser2_benchmark.rb

Constant Summary

Constants included from JSON

JSON::Infinity, JSON::JSON_LOADED, JSON::MAP, JSON::MinusInfinity, JSON::NaN, JSON::UnparserError, JSON::VERSION, JSON::VERSION_ARRAY, JSON::VERSION_BUILD, JSON::VERSION_MAJOR, JSON::VERSION_MINOR

Instance Method Summary collapse

Methods included from JSON

[], deep_const_get, dump, fast_generate, generate, iconv, load, parse, parse!, pretty_generate, recurse_proc, swap!, utf8_to_json, utf8_to_json_ascii

Instance Method Details

#generic_reset_methodObject



33
34
35
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 33

def generic_reset_method
  @result == @big or raise "not equal"
end

#setupObject



29
30
31
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 29

def setup
  @big = @json = File.read(File.join(File.dirname(__FILE__), 'ohai.json'))
end