Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem::Ext::Builder.shellsplit_command
shellsplit_command(command)
lib/rubygems/ext/builder.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/ext/builder.rb, line 168
def self.shellsplit_command(command)
return [command] if Gem.win_platform? && File.file?(command)
shellsplit(command)
end
Splits a command string such as ENV into an argument list.
On Windows, a value that names an existing file, such as C:\path\nmake.exe, is taken as a single word because POSIX shell splitting would consume the backslashes as escape characters. Any other value is split like a POSIX shell command line, where a path containing spaces must be quoted.