重音符``和exec及system使用中的区别
ruby吧
全部回复
仅看楼主
level 9
sevk 楼主
重音符``和exec及system使用中的区别
exec(“ls”) => exits from irb or the program
system(“ls”) => returns true or false (crap out)
`ls` => returns the output of the command as a string -> Nice!
2011年08月10日 09点08分 1
1