From: Steven Haryanto Date: 2001-06-16T13:10:40+09:00 Subject: [ruby-talk:16528] why only nil and false are regarded as false? I would appreciate some explanation on why Ruby behaves like this since this is in contrary to most languages I know (Perl, PHP, Python). Is this one of those Smalltalkism? What is the idiomatic testing for empty strings, zeroes, or other "false" values? #!/usr/bin/ruby for o in [true, false, '', [], {}, 0, 0.0, '0', ' ', nil] print o.inspect," is " if o puts true else puts false end end Regards, Steve