Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
33degrees
· 6y ago · 0 comments
In Ruby, nil is a singleton instance of NilClass, and defines #nil?, as well as methods to cast to different types e.g. nil.to_a == []. Rails goes a bit further and adds #blank?, which is handy for things that might be nil or empty strings.
Comments
No comments yet.
Better HN