summaryrefslogtreecommitdiff
path: root/lib/ffi_yajl/benchmark/encode_json_and_yaml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ffi_yajl/benchmark/encode_json_and_yaml.rb')
-rw-r--r--lib/ffi_yajl/benchmark/encode_json_and_yaml.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ffi_yajl/benchmark/encode_json_and_yaml.rb b/lib/ffi_yajl/benchmark/encode_json_and_yaml.rb
index 72310c1..6a145f2 100644
--- a/lib/ffi_yajl/benchmark/encode_json_and_yaml.rb
+++ b/lib/ffi_yajl/benchmark/encode_json_and_yaml.rb
@@ -1,14 +1,14 @@
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + "/..")
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + "/../lib")
-require "rubygems"
-require "benchmark"
+require "rubygems" unless defined?(Gem)
+require "benchmark" unless defined?(Benchmark)
require "yajl"
begin
- require "json"
+ require "json" unless defined?(JSON)
rescue LoadError
end
-require "yaml"
+require "yaml" unless defined?(YAML)
# JSON Section
filename = "benchmark/subjects/ohai.json"