Browse files

CLJS-774: ensure correct cljs.reader inst and ratio parsing.

  • Loading branch information...
1 parent 2870101 commit 004224511b4351acbfe051c7dea913fb0c183c04 @favila favila committed with swannodette Feb 27, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/cljs/cljs/reader.cljs
View
4 src/cljs/cljs/reader.cljs
@@ -133,7 +133,7 @@ nil if the end of stream has been reached")
(let [groups (re-find* ratio-pattern s)
numinator (aget groups 1)
denominator (aget groups 2)]
- (/ (js/parseInt numinator) (js/parseInt denominator))))
+ (/ (js/parseInt numinator 10) (js/parseInt denominator 10))))
(defn- match-float
[s]
@@ -468,7 +468,7 @@ nil if the end of stream has been reached")
(def ^:private timestamp-regex #"(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?")
(defn ^:private parse-int [s]
- (let [n (js/parseInt s)]
+ (let [n (js/parseInt s 10)]
(if-not (js/isNaN n)
n)))

0 comments on commit 0042245

Please sign in to comment.