mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Simplified single script case
Simply use `File.basename` to remove the directory name (and suffix), instead of `gsub` which can replace unintended parts.
This commit is contained in:
parent
eb75f0d134
commit
8dab71b9d0
1 changed files with 1 additions and 1 deletions
|
@ -675,7 +675,7 @@ module RbInstall
|
|||
remove_prefix(prefix, ruby_source)
|
||||
end
|
||||
else
|
||||
[remove_prefix(File.dirname(@gemspec) + '/', @gemspec.gsub(/gemspec/, 'rb'))]
|
||||
[File.basename(@gemspec, '.gemspec') + '.rb']
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue