According to :help ruby-evaluate, VIM::evaluate({expr}) returns string.
But since 7.2.374 it returns converted value for each type.

diff -r b64f0df9399c runtime/doc/if_ruby.txt
--- a/runtime/doc/if_ruby.txt    Tue Feb 17 17:50:26 2015 +0100
+++ b/runtime/doc/if_ruby.txt    Sat Feb 21 23:47:58 2015 +0900
@@ -120,9 +120,13 @@
                             *ruby-evaluate*
 VIM::evaluate({expr})
     Evaluates {expr} using the vim internal expression evaluator (see
-    |expression|).  Returns the expression result as a string.
-    A |List| is turned into a string by joining the items and inserting
-    line breaks.
+    |expression|).  Returns the expression result as:
+    - a Integer if the Vim expression evaluates to a number
+    - a Float if the Vim expression evaluates to a float
+    - a String if the Vim expression evaluates to a string
+    - a Array if the Vim expression evaluates to a Vim list
+    - a Hash if the Vim expression evaluates to a Vim dictionary
+    Dictionaries and lists are recursively expanded.

 ==============================================================================
 3. VIM::Buffer objects                    *ruby-buffer*


-- 
Yukihiro Nakadaira - [email protected]

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui