From: Cory Patterson Date: 2010-08-19T06:09:05+09:00 Subject: Check existence of object and it's property at the same time I run into this from time to time and I was wondering if there is a cleaner way to do check that an object is not nil and also check a property of that object. I want to do this: if !@member.nil? and @member.is_active? ... do something ... else ... do something else ... end But this obviously raises a no method error if @member is nil. I end up having to do: if !@member.nil? if @member.is_active? ... do something ... else ... do something else ... end end I know it isn't that much more verbose, but does ruby have a more elegant way of handling this? -- Posted via http://www.ruby-forum.com/.