Skip to content

Commit

Permalink
Merge pull request #62 from mohits/master
Browse files Browse the repository at this point in the history
Fixes loading problems when Gem is built for Windows
  • Loading branch information
heliocola authored Jan 19, 2024
2 parents 6361e38 + 941914f commit 3085782
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/redcloth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")}}
Expand Down

0 comments on commit 3085782

Please sign in to comment.