<< Back to previous view

[CONTRIB-108] c.c.pprint pprint-logical-block macro using private var Created: 05/May/11  Updated: 05/May/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Nevena Vidojevic Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None


 Description   

pprint-logical-block macro can't be used from the outside:
java.lang.IllegalStateException: var: clojure.contrib.pprint/current-level is not public






[CONTRIB-83] clojure.contrib.shell broken with clojure commit 37d8f7a Created: 12/May/10  Updated: 08/Jan/11

Status: Open
Project: Clojure-Contrib
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Assembla Importer Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

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 (mapping byte over values returned by InputStream.read in shell.clj, line 125).
Perhaps have sh use #(.byteValue %) instead of byte? (untested)



 Comments   
Comment by Assembla Importer [ 24/Aug/10 11:01 AM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/83

Comment by Allen Rohner [ 08/Jan/11 1:58 PM ]

I've tested that using #(.byteValue %) rather than byte? fixes the problem.





Generated at Wed Oct 01 21:51:12 CDT 2014 using JIRA 4.4#649-r158309.