Skip to content

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)

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.