to_s -> String[permalink][rdoc][edit]- 
実行結果を文字列で返します。
require 'shell' Shell.def_system_command("wc") sh = Shell.new sh.transact { puts (cat("/etc/passwd") | wc("-l")).to_s } 
to_s -> String[permalink][rdoc][edit]実行結果を文字列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
  puts (cat("/etc/passwd") | wc("-l")).to_s
}