Skip to content

Commit

Permalink
Restore Ruby 2.5 support broken in v1.2.4
Browse files Browse the repository at this point in the history
Pathname#relative_path_from supports string arguments
only in Ruby 2.6+ (see ruby/ruby@dde0e30c)

Fixes rake-compiler#224
  • Loading branch information
flavorjones committed Aug 2, 2023
1 parent 77d9294 commit f5a9ebc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rake/extensiontask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def define_compile_tasks(for_platform = nil, ruby_ver = RUBY_VERSION)
task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_path, tmp_binary_path, "#{tmp_path}/Makefile"] do
# install in lib for native platform only
unless for_platform
relative_lib_path = Pathname(lib_path).relative_path_from(tmp_path)
relative_lib_path = Pathname(lib_path).relative_path_from(Pathname.new(tmp_path))

make_command_line = Shellwords.shellsplit(make)
make_command_line << "install"
Expand Down

0 comments on commit f5a9ebc

Please sign in to comment.