Summary
Incorrect regexp in call to string-substitute causes random error rather than specific error message
Metadata
- Id: 8bd9ae9bd4619eb67eb0c40e4a44aade33faac5a
- Trac id: 74
- Type: defect
- Reporter: donallen
- Owner: ashinn
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone:
- Version: 4.1.x
- Changetime: 2010-08-01 00:04:50 UTC
- Created: 2009-09-08 14:30:53 UTC
- Keywords:
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.
Changes and comments
[2009-09-08 14:33:10 UTC] donallen wrote:
I should have mentioned that I am running
Version 4.1.0 - SVN rev. 15292
on an OpenBSD 4.5 Release (amd64) system.
[2009-09-09 09:56:43 UTC] felix removed owner
[2009-09-09 09:56:43 UTC] felix changed component from build system to core libraries
[2009-09-17 12:33:35 UTC] felix changed status from new to assigned
[2009-09-17 12:33:35 UTC] felix set owner to ashinn
[2010-08-01 00:04:50 UTC] felix changed status from assigned to closed
[2010-08-01 00:04:50 UTC] felix set resolution to fixed
[2010-08-01 00:04:50 UTC] felix wrote:
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).