ruby: return string function