mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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)
This commit is contained in:
@@ -1085,8 +1085,10 @@ static VALUE vim_to_ruby(typval_T *tv)
|
||||
}
|
||||
else if (tv->v_type == VAR_SPECIAL)
|
||||
{
|
||||
if (tv->vval.v_number <= VVAL_TRUE)
|
||||
result = INT2NUM(tv->vval.v_number);
|
||||
if (tv->vval.v_number == VVAL_TRUE)
|
||||
result = Qtrue;
|
||||
else if (tv->vval.v_number == VVAL_FALSE)
|
||||
result = Qfalse;
|
||||
} /* else return Qnil; */
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user