Skip to content

Commit

Permalink
Rather than looking at the RUBY_VERSION, check the YAML.parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryckbost committed Sep 28, 2011
1 parent e70b6ba commit df8622c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/delayed/yaml_ext.rb
Original file line number Diff line number Diff line change
@@ -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.