> @log.debug( "finishing foo with #{result}" ) if @log.debug

You forgot a question mark.