clojure.core/byte was modified a couple weeks ago as follows:

 (defn byte
   "Coerce to byte"     
   {:tag Byte
    :inline (fn  [x] `(. clojure.lang.RT (byteCast ~x)))}
-  [^Number x] (. x (byteValue)))
+  [^Number x] (clojure.lang.RT/byteCast x))

byteValue and byteCast behave differently with values outside the
range of byte values:
user=> (. 255 (byteValue))
-1
user=> (clojure.lang.RT/byteCast 255)
java.lang.IllegalArgumentException: Value out of range for byte: 255
(NO_SOURCE_FILE:0)

The new version breaks clojure.contrib.shell/sh's :out :bytes mode.
Perhaps have sh use #(.byteValue %) instead of byte? (untested)

-Dave

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to