ruby: return in block