summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-03-03 13:32:42 +0000
committerRich Hickey <richhickey@gmail.com>2009-03-03 13:32:42 +0000
commit7dc9d669d55392fc83b1145f44f5e4878c73b668 (patch)
tree84696e3a702c3eccdcf36bce566c2912d5f06b06
parentf53b8833593d8a68fe1c7a00659f7f046e98eb15 (diff)
fix cast in read-line [issue 82], patch from Chouser/Trolard
-rw-r--r--src/clj/clojure/core.clj5
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"