<< Back to previous view

[CLJS-608] re-seq does not terminate in some cases Created: 06/Oct/13  Updated: 17/Oct/13  Resolved: 17/Oct/13

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Russell Mull Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: bug

Clojurescript 1913

Attachments: File re-seq-20131017.diff    


re-matches behaves as expected:

;; clojure:
(re-matches #"\s*" "") ;; ""

;; clojurescript:
(re-matches #"\s*" "") ;; ""

re-seq does not:

;; clojure:
(re-seq #"\s*" "") ;; ("")

;; clojurescript:
(re-seq #"\s*" "") ;; infinite sequence of ""

Comment by Travis Thieman [ 17/Oct/13 12:34 PM ]

Patch: 20131017

Always allow one pass through the string, but terminate the lazy sequence if the end of the string is reached after the first match.

Comment by David Nolen [ 17/Oct/13 1:28 PM ]

We should have a test in the patch, thanks!

Comment by Travis Thieman [ 17/Oct/13 2:34 PM ]

Patch revised with test added

Comment by David Nolen [ 17/Oct/13 2:44 PM ]

fixed, http://github.com/clojure/clojurescript/commit/e483c4a63560cd9df4c96722beaf390006e50b9e

Generated at Sun Jan 21 11:00:18 CST 2018 using JIRA 4.4#649-r158309.