DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Alexey has posted 28 posts at DZone. View Full User Profile

Read From Console In Ruby: STDIN.gets

04.21.2010
| 11502 views |
  • submit to reddit
        To read a line from console in ruby use 
STDIN.gets

WARNING: 
gets
 reads a line from file specified by 1st parameter:
c:\Windows>ruby -e 'puts gets' win.ini
; for 16-bit app support