summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-01-12 20:33:36 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-01-12 20:33:36 -0800
commitf4e1c6bf5c7976e7903d4a8aac503834626643de (patch)
tree5285dda5f726ea6c42e06fa445984cbd310c041e
parent0cc58f677238a09aefd8544de665fc9afc24fe30 (diff)
downloadffi-yajl-f4e1c6bf5c7976e7903d4a8aac503834626643de.tar.gz
the rbx work fixed ruby-1.8 c-ext
-rw-r--r--README.md2
-rw-r--r--Rakefile2
-rw-r--r--lib/ffi_yajl/ext.rb8
3 files changed, 5 insertions, 7 deletions
diff --git a/README.md b/README.md
index 9c89033..b435f22 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/Rakefile b/Rakefile
index 50ca1b8..4df9279 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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