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
Menu
Read till 'quit' : break « Statement « Ruby
Ruby
Statement
break
Read till 'quit'
while
(line = gets.chop)
break
if
line ==
"quit"
puts eval(line) end puts
"Good bye"
Related examples in the same category
1.
break ends the immediately enclosing loop.
2.
Break out of a block
3.
Stopping an Iteration
4.
Break if