diff options
author | Sutou Kouhei <kou@clear-code.com> | 2021-12-12 06:33:31 +0900 |
---|---|---|
committer | Sutou Kouhei <kou@clear-code.com> | 2021-12-12 06:33:31 +0900 |
commit | 92b2d3ef46d191cabb02b9d164e3213dcade3659 (patch) | |
tree | 9d3f4ba473a7a29a86a4701747d01d350ae2aa2a | |
parent | 325de68d58968ccd8c49eaef5d9df69d44e866dc (diff) | |
download | rake-compiler-92b2d3ef46d191cabb02b9d164e3213dcade3659.tar.gz |
Fix a regression bug
GitHub: fix GH-196
It's caused when name that includes "/" is specified to
Rake::ExtensionTask.new and the default lib_dir is used such as
https://github.com/konsolebox/digest-xxhash-ruby . In the case, built
binaries are copied to lib/ not lib/XXX/.
Reported by konsolebox. Thanks!!!
-rw-r--r-- | lib/rake/baseextensiontask.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rake/baseextensiontask.rb b/lib/rake/baseextensiontask.rb index db3fa16..3e6989e 100644 --- a/lib/rake/baseextensiontask.rb +++ b/lib/rake/baseextensiontask.rb @@ -40,6 +40,9 @@ module Rake @tmp_dir = 'tmp' @ext_dir = "ext/#{@name}" @lib_dir = 'lib' + if @name and File.dirname(@name) != "." + @lib_dir += "/#{File.dirname(@name)}" + end @config_options = [] @extra_options = ARGV.select { |i| i =~ /\A--?/ } end |