Ruby proc/lambda behavior