Skip to content

Commit

Permalink
CLJCLR-127: fix slurp argument warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dmiller committed Jan 7, 2023
1 parent ffa49d1 commit d54b9bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Clojure/Clojure.Source/clojure/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7009,7 +7009,7 @@ clojure.lang.IKVReduce

(defn- normalize-slurp-opts
[opts]
(if (not (keyword? (first opts))) ;;; (string? (first opts))
(if (string? (first opts))
(do
(println "WARNING: (slurp f enc) is deprecated, use (slurp f :encoding enc).")
[:encoding (first opts)])
Expand Down
2 changes: 1 addition & 1 deletion Clojure/Clojure.Tests/clojure/test_clojure/clr/io.clj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
(is (=
(platform-newlines "WARNING: (slurp f enc) is deprecated, use (slurp f :encoding enc).\n")
(with-out-str
(is (= content (slurp f utf16))))))))))
(is (= content (slurp f "utf-16"))))))))))

(deftest test-streams-defaults
(let [f (temp-file "test-reader-writer")
Expand Down

0 comments on commit d54b9bf

Please sign in to comment.