diff --git a/lib/redcloth.rb b/lib/redcloth.rb index 0fc2d60..376d022 100644 --- a/lib/redcloth.rb +++ b/lib/redcloth.rb @@ -10,6 +10,11 @@ conf = Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG prefix = conf['arch'] =~ /mswin|mingw/ ? "#{conf['MAJOR']}.#{conf['MINOR']}/" : '' lib = "#{prefix}redcloth_scan" + begin + require lib + rescue LoadError => e + lib = "redcloth_scan" + end require lib rescue LoadError => e e.message << %{\nCouldn't load #{lib}\nThe $LOAD_PATH was:\n#{$LOAD_PATH.join("\n")}}