Commit 5e3cc418 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2121 from mirichi/enhance

Refactoring Array#__svalue
parents 49abcd4c d2e4937c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment