patch 8.2.0111: VAR_SPECIAL is also used for booleans
Problem: VAR_SPECIAL is also used for booleans.
Solution: Add VAR_BOOL for better type checking.
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 68d5582..7f2a7d2 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -1183,7 +1183,7 @@
}
}
}
- else if (tv->v_type == VAR_SPECIAL)
+ else if (tv->v_type == VAR_BOOL || tv->v_type == VAR_SPECIAL)
{
if (tv->vval.v_number == VVAL_TRUE)
result = Qtrue;
@@ -1827,11 +1827,11 @@
rettv->vval.v_number = VVAL_NULL;
break;
case T_TRUE:
- rettv->v_type = VAR_SPECIAL;
+ rettv->v_type = VAR_BOOL;
rettv->vval.v_number = VVAL_TRUE;
break;
case T_FALSE:
- rettv->v_type = VAR_SPECIAL;
+ rettv->v_type = VAR_BOOL;
rettv->vval.v_number = VVAL_FALSE;
break;
case T_BIGNUM: