Patch 8.1.0220
Problem:    Ruby converts v:true and v:false to a number.
Solution:   Use Qtrue and Qfalse instead. (Masataka Pocke Kuwabara,
            closes #3259)
Files:      src/if_ruby.c, src/testdir/test_ruby.vim


*** ../vim-8.1.0219/src/if_ruby.c       2018-07-25 22:02:32.231966301 +0200
--- src/if_ruby.c       2018-07-28 17:12:56.698546960 +0200
***************
*** 1085,1092 ****
      }
      else if (tv->v_type == VAR_SPECIAL)
      {
!       if (tv->vval.v_number <= VVAL_TRUE)
!           result = INT2NUM(tv->vval.v_number);
      } /* else return Qnil; */
  
      return result;
--- 1085,1094 ----
      }
      else if (tv->v_type == VAR_SPECIAL)
      {
!       if (tv->vval.v_number == VVAL_TRUE)
!           result = Qtrue;
!       else if (tv->vval.v_number == VVAL_FALSE)
!           result = Qfalse;
      } /* else return Qnil; */
  
      return result;
*** ../vim-8.1.0219/src/testdir/test_ruby.vim   2018-07-25 22:02:32.235966277 
+0200
--- src/testdir/test_ruby.vim   2018-07-28 17:12:56.698546960 +0200
***************
*** 33,38 ****
--- 33,46 ----
    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
*** ../vim-8.1.0219/src/version.c       2018-07-28 17:07:48.608154066 +0200
--- src/version.c       2018-07-28 17:14:20.930093228 +0200
***************
*** 800,801 ****
--- 800,803 ----
  {   /* Add new patch number below this line */
+ /**/
+     220,
  /**/

-- 
A real patriot is the fellow who gets a parking ticket and rejoices
that the system works.


 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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