summaryrefslogtreecommitdiff
path: root/src/testdir/test_ruby.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-28 17:18:09 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-28 17:18:09 +0200
commitd84b26a03b13cd816d80ff32b61e8de740d499ce (patch)
tree945aff2c7fdba4c7fe665044e53c0f8f6ce7d038 /src/testdir/test_ruby.vim
parent2c8c681bfcd5138a0ec8ce018216dc2dc69a11a0 (diff)
downloadvim-git-d84b26a03b13cd816d80ff32b61e8de740d499ce.tar.gz
patch 8.1.0220: Ruby converts v:true and v:false to a numberv8.1.0220
Problem: Ruby converts v:true and v:false to a number. Solution: Use Qtrue and Qfalse instead. (Masataka Pocke Kuwabara, closes #3259)
Diffstat (limited to 'src/testdir/test_ruby.vim')
-rw-r--r--src/testdir/test_ruby.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_ruby.vim b/src/testdir/test_ruby.vim
index ae27b39cd..36442fcbc 100644
--- a/src/testdir/test_ruby.vim
+++ b/src/testdir/test_ruby.vim
@@ -33,6 +33,14 @@ func Test_ruby_evaluate_dict()
call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n"))
endfunc
+func Test_ruby_evaluate_special_var()
+ let l = [v:true, v:false, v:null, v:none]
+ redir => l:out
+ ruby d = Vim.evaluate("l"); print d
+ redir END
+ call assert_equal(['[true, false, nil, nil]'], split(l:out, "\n"))
+endfunc
+
func Test_rubydo()
" Check deleting lines does not trigger ml_get error.
new