Sha256: b738aa7dd9a6aa5478602bb74ef521121aefde4d3dce70136d6c040f810434f3

Contents?: true

Size: 378 Bytes

Versions: 19

Compression:

Stored size: 378 Bytes

Contents

#if windows os
require 'rbconfig'
is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
if is_windows
  module Shellwords
    def shellescape(str)
      '"' + str.gsub(/\\(?=\\*\")/, "\\\\\\").gsub(/\"/, "\\\"").gsub(/\\$/, "\\\\\\").gsub("%", "%%") + '"'
    end

    module_function :shellescape
    class << self
      alias escape shellescape
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mina-1.2.4 lib/mina/windows_patches.rb
mina-1.2.3 lib/mina/windows_patches.rb
mina-1.2.2 lib/mina/windows_patches.rb
mina-1.2.1 lib/mina/windows_patches.rb
mina-1.2.0 lib/mina/windows_patches.rb
mina-1.1.1 lib/mina/windows_patches.rb
mina-1.1.0 lib/mina/windows_patches.rb
mina-1.0.7 lib/mina/windows_patches.rb
mina-1.0.6 lib/mina/windows_patches.rb
mina-1.0.5 lib/mina/windows_patches.rb
mina-1.0.4 lib/mina/windows_patches.rb
mina-1.0.3 lib/mina/windows_patches.rb
mina-1.0.2 lib/mina/windows_patches.rb
mina-1.0.0 lib/mina/windows_patches.rb
mina-1.0.0.rc2 lib/mina/windows_patches.rb
mina-1.0.0.beta5 lib/mina/windows_patches.rb
mina-1.0.0.beta4 lib/mina/windows_patches.rb
mina-1.0.0.beta3 lib/mina/windows_patches.rb
mina-1.0.0.beta2 lib/mina/windows_patches.rb