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
if a value is a zero or not. : zero « Number « Ruby
Ruby
Number
zero
if a value is a zero or not.
op = 0 op.zero? # => true op.nonzero? # => false
Related examples in the same category
1.
Use if statement to check zero