Class: String
Overview
Suraj Kurapati – blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/261459
Instance Method Summary collapse
-
#shell_escape ⇒ Object
Transforms this string into an escaped POSIX shell argument.
Instance Method Details
#shell_escape ⇒ Object
Transforms this string into an escaped POSIX shell argument.
4 5 6 |
# File 'lib/ext/shell_escape.rb', line 4 def shell_escape inspect.gsub(/\\(\d{3})/) {$1.to_i(8).chr} end |