T
tim.griffin
Hi all,
I'm growing weary of writing checks like this:
c = (c.nil? ? d : c+= d) ?
I'd really just like to write
c+= d
and have Ruby deal with the fact that c might be nil for the assignment.
Is there a short cut I don't know about?
Thanks!
Tim
I'm growing weary of writing checks like this:
c = (c.nil? ? d : c+= d) ?
I'd really just like to write
c+= d
and have Ruby deal with the fact that c might be nil for the assignment.
Is there a short cut I don't know about?
Thanks!
Tim