Opened 15 years ago

Closed 14 years ago

#74 closed defect (fixed)

Incorrect regexp in call to string-substitute causes random error rather than specific error message

Reported by: Don Allen Owned by: Alex Shinn
Priority: major Milestone:
Component: core libraries Version: 4.1.x
Keywords: Cc:
Estimated difficulty:

Description

#;1> (string-substitute

"{12mp}"
"TRUE"
"{12mp}"
#t)

Error: (car) bad argument type: ()

Call history:

<syntax> (string-substitute "{12mp}" "TRUE" "{12mp}" #t)
<eval> (string-substitute "{12mp}" "TRUE" "{12mp}" #t) <--

#;1>

The braces in the regexp are incorrect -- they needed backslashes -- but the resulting error is very unhelpful. The regexp is mal-formed, and the regexp compiler ought to say so.

Change History (4)

comment:1 Changed 15 years ago by Don Allen

I should have mentioned that I am running

Version 4.1.0 - SVN rev. 15292

on an OpenBSD 4.5 Release (amd64) system.

comment:2 Changed 15 years ago by felix winkelmann

Component: build systemcore libraries

comment:3 Changed 15 years ago by felix winkelmann

Owner: set to Alex Shinn
Status: newassigned

comment:4 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: assignedclosed

This is fixed in version 0.8.2 of irregex, which is currently awaiting being integrated into chicken (see total-irregex branch of the core system git repository).

Note: See TracTickets for help on using tickets.