如何以跨平台方式进行?
#!/usr/bin/env ruby str = (STDIN.tty?) ? 'not reading from stdin' : $stdin.read puts str >> $ruby test.rb >> not reading from stdin >> $echo "reading from stdin" | ruby test.rb >> reading from stdin