diff options
author | Rich Hickey <richhickey@gmail.com> | 2009-03-03 13:32:42 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-03-03 13:32:42 +0000 |
commit | 7dc9d669d55392fc83b1145f44f5e4878c73b668 (patch) | |
tree | 84696e3a702c3eccdcf36bce566c2912d5f06b06 | |
parent | f53b8833593d8a68fe1c7a00659f7f046e98eb15 (diff) |
fix cast in read-line [issue 82], patch from Chouser/Trolard
-rw-r--r-- | src/clj/clojure/core.clj | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj index 876aa121..3c1737f9 100644 --- a/src/clj/clojure/core.clj +++ b/src/clj/clojure/core.clj @@ -2094,7 +2094,10 @@ (defn read-line "Reads the next line from stream that is the current value of *in* ." - [] (. #^java.io.BufferedReader *in* (readLine))) + [] + (if (instance? clojure.lang.LineNumberingPushbackReader *in*) + (.readLine #^clojure.lang.LineNumberingPushbackReader *in*) + (.readLine #^java.io.BufferedReader *in*))) (defn read-string "Reads one object from the string s" |