<< Back to previous view

[CLJ-751] cl-format: ~( thows an exception with an empty string Created: 05/Mar/11  Updated: 01/Mar/13  Resolved: 08/Apr/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.2, Release 1.3
Fix Version/s: Release 1.3

Type: Defect Priority: Minor
Reporter: Tom Faulhaber Assignee: Tom Faulhaber
Resolution: Completed Votes: 0
Labels: None

Attachments: File clj-751.diff    
Patch: Code and Test
Approval: Ok

 Comments   
Comment by Tom Faulhaber [ 05/Mar/11 7:44 PM ]

The following block of code throws an index out of range exception:

(cl-format nil "~:(~a~)" "")
Comment by Tom Faulhaber [ 06/Mar/11 12:01 AM ]

Patch that fixes the issue and adds tests

Comment by Stuart Halloway [ 20/Mar/11 10:17 AM ]

Patch works. One question: Why does cl-format print "nil" as "Nil"? Is this a CL-ism? Do we want it?

Comment by Tom Faulhaber [ 21/Mar/11 10:51 AM ]

Answer: cl-format doesn't print nil as "Nil". The () construction is a case control operator. In this case, it capitalizes the each word in the expression: http://www.lispworks.com/documentation/HyperSpec/Body/22_cha.htm.

In general, I've suppressed the obvious "CL-only" stuff like upper case symbols and such and replaced them with the corresponding Clojure conventions.

Generated at Mon Jul 28 01:38:22 CDT 2014 using JIRA 4.4#649-r158309.