Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
chomp « Development « Ruby
Ruby
Development
chomp
1.
Ruby method chomp removes that newline character from the end of the text in the $_ variable.
2.
you don't need to use $_ with gets - you can assign the text it reads to any variable: temperature = gets