summaryrefslogtreecommitdiffhomepage
path: root/mrblib/array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib/array.rb')
-rw-r--r--mrblib/array.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/mrblib/array.rb b/mrblib/array.rb
index aa50ac181..8c81d80f1 100644
--- a/mrblib/array.rb
+++ b/mrblib/array.rb
@@ -97,6 +97,18 @@ class Array
ret
end
end
+
+ # internal method to convert multi-value to single value
+ def __to_svalue
+ case self.size
+ when 0
+ return nil
+ when 1
+ self[0]
+ else
+ self
+ end
+ end
end
##