[CLJ-925] rand-nth throws on empty list Created: 05/Feb/12 Updated: 14/Aug/12 Resolved: 14/Aug/12 |
|
| Status: | Closed |
| Project: | Clojure |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Minor |
| Reporter: | Jozef Wagner | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Code |
| Approval: | Not Approved |
| Description |
|
rand-nth throws when given an empty list. Solution is to either call seq on parameter, or to supply nil as a not-found parameter in call to nth. Patch fir latter fix included. |
| Comments |
| Comment by Andy Fingerhut [ 23/Mar/12 2:38 AM ] |
|
Changing Patch attribute to value "Code", since I've been told that is what it ought to be for a ticket with a patch ready for screening. |