RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

Ruby and Rails Syntax Tips - The Difference Between blank?, nil?, and empty?

When working with Ruby and Rails, a common source of confusion involves mixing up nil?, blank?, and empty?. All three methods clearly deal with determining whether a data structure is assigned a value, but there are different degrees of nothingness, and in the world of programming those degrees are important. This blog post helps to dispel the confusion by working through a number of different examples.

Comments

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!