Mercurial > vim
comparison src/testdir/test_ruby.vim @ 14411:504091aca571 v8.1.0220
patch 8.1.0220: Ruby converts v:true and v:false to a number
commit https://github.com/vim/vim/commit/d84b26a03b13cd816d80ff32b61e8de740d499ce
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 28 17:18:09 2018 +0200
patch 8.1.0220: Ruby converts v:true and v:false to a number
Problem: Ruby converts v:true and v:false to a number.
Solution: Use Qtrue and Qfalse instead. (Masataka Pocke Kuwabara,
closes #3259)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Jul 2018 17:30:06 +0200 |
parents | c15bef307de6 |
children | c3b62844ee4e |
comparison
equal
deleted
inserted
replaced
14410:52f6ab1e154a | 14411:504091aca571 |
---|---|
29 let d = {'a': 'foo', 'b': 123} | 29 let d = {'a': 'foo', 'b': 123} |
30 redir => l:out | 30 redir => l:out |
31 ruby d = Vim.evaluate("d"); print d | 31 ruby d = Vim.evaluate("d"); print d |
32 redir END | 32 redir END |
33 call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) | 33 call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) |
34 endfunc | |
35 | |
36 func Test_ruby_evaluate_special_var() | |
37 let l = [v:true, v:false, v:null, v:none] | |
38 redir => l:out | |
39 ruby d = Vim.evaluate("l"); print d | |
40 redir END | |
41 call assert_equal(['[true, false, nil, nil]'], split(l:out, "\n")) | |
34 endfunc | 42 endfunc |
35 | 43 |
36 func Test_rubydo() | 44 func Test_rubydo() |
37 " Check deleting lines does not trigger ml_get error. | 45 " Check deleting lines does not trigger ml_get error. |
38 new | 46 new |