Changes for clojure.core/refer

ryo on Fri, 09 May 2014
;;; `:only' accepts only original names.
;; wrong
user=> (refer 'clojure.string
              :rename '{capitalize cap, trim trm}
              :only '[cap trm])
IllegalAccessError cap does not exist  clojure.core/refer (core.clj:3849)

;; right
user=> (refer 'clojure.string
              :rename '{capitalize cap, trim trm}
              :only '[capitalize trim])
nil

;; work well
user=> (cap (trm " hOnduRAS  "))
"Honduras"

;; and also, cannot use either of them.
user=> (join \, [1 2 3])
CompilerException java.lang.RuntimeException: Unable to resolve symbol: join in this context, compiling:(NO_SOURCE_PATH:1:1)
ryo on Fri, 09 May 2014
;;; `:only' accepts original names.
;; renamed cause error
user=> (refer 'clojure.string
              :rename '{capitalize cap, trim trm}
              :only '[cap trm])
IllegalAccessError cap does not exist  clojure.core/refer (core.clj:3849)

;; collect
user=> (refer 'clojure.string
              :rename '{capitalize cap, trim trm}
              :only '[capitalize trim])
nil

;; work well
user=> (cap (trm " hOnduRAS  "))
"Honduras"

;; and also, cannot use either of them.
user=> (join \, [1 2 3])
CompilerException java.lang.RuntimeException: Unable to resolve symbol: join in this context, compiling:(NO_SOURCE_PATH:1:1)
ryo on Tue, 06 May 2014
user=> (refer 'clojure.string :rename '{capitalize cap, trim trm} :only '[cap trm])
IllegalAccessError cap does not exist  clojure.core/refer (core.clj:3849)

user=> (refer 'clojure.string :rename '{capitalize cap, trim trm} :only '[capitalize trim])
nil

user=> (cap (trm " hOnduRAS  "))
"Honduras"

user=> (join \, [1 2 3])
CompilerException java.lang.RuntimeException: Unable to resolve symbol: join in this context, compiling:(NO_SOURCE_PATH:1:1)