Ruby: Value returns an object