diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-12 20:33:36 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-12 20:33:36 -0800 |
commit | f4e1c6bf5c7976e7903d4a8aac503834626643de (patch) | |
tree | 5285dda5f726ea6c42e06fa445984cbd310c041e | |
parent | 0cc58f677238a09aefd8544de665fc9afc24fe30 (diff) | |
download | ffi-yajl-f4e1c6bf5c7976e7903d4a8aac503834626643de.tar.gz |
the rbx work fixed ruby-1.8 c-ext
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | Rakefile | 2 | ||||
-rw-r--r-- | lib/ffi_yajl/ext.rb | 8 |
3 files changed, 5 insertions, 7 deletions
@@ -4,7 +4,6 @@ ## TODO - fix int conversion issue in chef specs in c extension -- fix c extension on rubinius ## BUILD NOTES @@ -14,4 +13,3 @@ ## KNOWN BUGS - 'rake compile' broken on mac, only tested to work on linux (ubuntu) -- C Extension segfaults on ruby 1.8.7, so the ffi mode is forced for RUBY_VERSION < 1.9 @@ -21,7 +21,7 @@ namespace :spec do ENV['FORCE_FFI_YAJL'] = "ffi" t.pattern = FileList['spec/**/*_spec.rb'] end - if RUBY_VERSION.to_f >= 1.9 && RUBY_ENGINE !~ /jruby/ + if !defined?(RUBY_ENGINE) || RUBY_ENGINE !~ /jruby/ desc "Run all specs again c extension" RSpec::Core::RakeTask.new(:ext) do |t| ENV['FORCE_FFI_YAJL'] = "ext" diff --git a/lib/ffi_yajl/ext.rb b/lib/ffi_yajl/ext.rb index 30f79bd..7b6d3de 100644 --- a/lib/ffi_yajl/ext.rb +++ b/lib/ffi_yajl/ext.rb @@ -3,10 +3,10 @@ require 'rubygems' require 'ffi_yajl/encoder' require 'ffi_yajl/parser' -unless RUBY_VERSION.to_f >= 1.9 - # segfaults on ruby 1.8 and this is an exceedingly low priority to fix, use ffi instead - raise NotImplementedError, "The C-extension is disabled on Ruby 1.8" -end +#unless RUBY_VERSION.to_f >= 1.9 +# # segfaults on ruby 1.8 and this is an exceedingly low priority to fix, use ffi instead +# raise NotImplementedError, "The C-extension is disabled on Ruby 1.8" +#end module FFI_Yajl class Parser |