E
Edmond Kachale
[Note: parts of this message were removed to make it a legal post.]
Rubysters,
I was sharing with some friends how to use if and unless. I wrote this
statement: *puts nil if nil*
and I got =>nil. (Which implies nothing was printed.)
When I wrote: *puts nil unless nil*
I got:
nil
=> nil
Which implies that puts output nil.
My question is what is in *"nil"* that makes "*puts*" print "*nil"*? Or is
there any explanation to back this behaviour?
---
Edmond
Software Developer | Baobab Health Trust (http://www.baobabhealth.org/) |
Malawi
Cell: +265 999 465 137 | +265 881 234 717
*"Leading the Improvement of Health through Information and Communication
Technology in the Developing World" The **Creed* of *Baobab Health
*
Rubysters,
I was sharing with some friends how to use if and unless. I wrote this
statement: *puts nil if nil*
and I got =>nil. (Which implies nothing was printed.)
When I wrote: *puts nil unless nil*
I got:
nil
=> nil
Which implies that puts output nil.
My question is what is in *"nil"* that makes "*puts*" print "*nil"*? Or is
there any explanation to back this behaviour?
---
Edmond
Software Developer | Baobab Health Trust (http://www.baobabhealth.org/) |
Malawi
Cell: +265 999 465 137 | +265 881 234 717
*"Leading the Improvement of Health through Information and Communication
Technology in the Developing World" The **Creed* of *Baobab Health
*