Refactoring Array#__svalue

This commit is contained in:
mirichi
2014-04-25 21:36:52 +09:00
parent 49abcd4c02
commit d2e4937cea
+2 -5
View File
@@ -187,11 +187,8 @@ class Array
# internal method to convert multi-value to single value
def __svalue
case self.size
when 0
return nil
when 1
self[0]
if self.size < 2
self.first
else
self
end