summaryrefslogtreecommitdiff
path: root/lib/ffi_yajl/benchmark/encode_json_and_marshal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ffi_yajl/benchmark/encode_json_and_marshal.rb')
-rw-r--r--lib/ffi_yajl/benchmark/encode_json_and_marshal.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ffi_yajl/benchmark/encode_json_and_marshal.rb b/lib/ffi_yajl/benchmark/encode_json_and_marshal.rb
index 4269056..5ef6f7d 100644
--- a/lib/ffi_yajl/benchmark/encode_json_and_marshal.rb
+++ b/lib/ffi_yajl/benchmark/encode_json_and_marshal.rb
@@ -1,12 +1,12 @@
$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"
-require "stringio"
+require "stringio" unless defined?(StringIO)
begin
- require "json"
+ require "json" unless defined?(JSON)
rescue LoadError
end