Permalink
Browse files

Rather than looking at the RUBY_VERSION, check the YAML.parser.

  • Loading branch information...
1 parent e70b6ba commit df8622c196acad6464a2d777a291e5e7d2ae1cc0 @bryckbost bryckbost committed Sep 28, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/delayed/yaml_ext.rb
View
6 lib/delayed/yaml_ext.rb
@@ -1,11 +1,9 @@
# These extensions allow properly serializing and autoloading of
# Classes, Modules and Structs
-if RUBY_VERSION < '1.9.0'
- require 'syck'
+require 'yaml'
+if YAML.parser.class.name =~ /syck/i
require File.expand_path('../syck_ext', __FILE__)
else
- require 'psych'
require File.expand_path('../psych_ext', __FILE__)
end
-require 'yaml'

0 comments on commit df8622c

Please sign in to comment.