if block -> if block_given?

I prefer to take this way as against that way.