Permalink
Browse files

fix re-pattern

  • Loading branch information...
1 parent a78be3e commit abda4e49364a8b4b800f3fed28f803cb08282d42 @richhickey richhickey committed Jul 23, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/cljs/cljs/core.cljs
View
4 src/cljs/cljs/core.cljs
@@ -2370,7 +2370,9 @@ reduces them without incurring seq initialization"
(defn re-pattern
"Returns an instance of RegExp which has compiled the provided string."
[s]
- (doto (js/RegExp. s) (.compile ())))
+ (let [re (js/RegExp. s)]
+ (. re (compile))
+ re))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Printing ;;;;;;;;;;;;;;;;

0 comments on commit abda4e4

Please sign in to comment.