summaryrefslogtreecommitdiff
path: root/lib/ffi_yajl/benchmark/encode.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2013-11-17 15:43:43 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2013-11-17 15:43:43 -0800
commit217503fb5c8b09faffe8ff69dad497db44b02b8b (patch)
treee9ce95b0d7314e1fef038d963da24a5398eb263a /lib/ffi_yajl/benchmark/encode.rb
parentb96e970f1185c4e3fc39aa3e19405072addd3445 (diff)
downloadffi-yajl-217503fb5c8b09faffe8ff69dad497db44b02b8b.tar.gz
jruby throws an uncatchable exception
Diffstat (limited to 'lib/ffi_yajl/benchmark/encode.rb')
-rw-r--r--lib/ffi_yajl/benchmark/encode.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/ffi_yajl/benchmark/encode.rb b/lib/ffi_yajl/benchmark/encode.rb
index 16eb8ea..e9e1fd8 100644
--- a/lib/ffi_yajl/benchmark/encode.rb
+++ b/lib/ffi_yajl/benchmark/encode.rb
@@ -3,12 +3,14 @@
require 'rubygems'
require 'benchmark'
-begin
- require 'yajl'
-rescue
- puts "INFO: yajl-ruby not installed"
+unless RUBY_VERSION =~ /jruby/
+ begin
+ require 'yajl'
+ require 'stringio'
+ rescue
+ puts "INFO: yajl-ruby not installed"
+ end
end
-require 'stringio'
require 'ffi_yajl'
begin
require 'json'