Non-existent variables are ignored if re is {}
Closed / Fixedcb03e57a7b24d22c071acc1b00bc1d91649d1d79Created 6 years agoUpdated 1 year ago
Descriptionplain2020-10-21 02:19:14
"This should not be!"
% unset -nocomplain q
% regexp {.} $q
can't read "q": no such variable
% regexp {} $q
1
stu (claiming to be Stu)plain2025-11-08 02:19:14
Same result with 9.0.3rc0.
emiliano on chat pointed out that this yields the same result as well:
% regexp {} [set q]
1
apnadkarnimarkdown2025-11-08 06:45:43
% set regexp regexp
regexp
% $regexp {} $q
can't read "q": no such variable
So looks like an issue with the byte compiled form.
apnadkarnimarkdown2025-11-08 07:43:11
Proposed fix in branch bug-cb03e57a.
jan.nijtmanswiki2025-11-08 23:23:31
+1. Let's fix this for 9.0.3
jan.nijtmanswiki2025-11-11 19:52:09
Fixed [here]
Log in (anonymous is fine) to add a comment.