Monday, March 19, 2012

Comparison between ruby if and unless


1.9.2-p290 :035 > unless false
1.9.2-p290 :036?>   puts 'a'
1.9.2-p290 :037?>   else
1.9.2-p290 :038 >     puts 'b'
1.9.2-p290 :039?>   end
a
 => nil
1.9.2-p290 :040 > if false
1.9.2-p290 :041?>   puts 'a'
1.9.2-p290 :042?>   else
1.9.2-p290 :043 >     puts 'b'
1.9.2-p290 :044?>   end
b

1 comment:

  1. Created with all the World" will be the latest marketing and advertising push the finance Chinese Clothing department with the Peoples Republic of China has blitzed in tv, world wide web, and radio internationally.

    ReplyDelete