[#93] Pickup record redefinitions at REPL, etc. (@smee)
This commit is contained in:
parent
0819ede2c1
commit
1a8a44286a
2 changed files with 10 additions and 1 deletions
|
|
@ -1097,7 +1097,7 @@
|
||||||
(defn- read-record [in class-name]
|
(defn- read-record [in class-name]
|
||||||
(let [content (thaw-from-in! in)]
|
(let [content (thaw-from-in! in)]
|
||||||
(try
|
(try
|
||||||
(let [class (Class/forName class-name)
|
(let [class (clojure.lang.RT/classForName class-name)
|
||||||
method (.getMethod class "create" class-method-sig)]
|
method (.getMethod class "create" class-method-sig)]
|
||||||
(.invoke method class (into-array Object [content])))
|
(.invoke method class (into-array Object [content])))
|
||||||
(catch Exception e
|
(catch Exception e
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,15 @@
|
||||||
(range 50))]
|
(range 50))]
|
||||||
(every? deref futures))))
|
(every? deref futures))))
|
||||||
|
|
||||||
|
;;;; Redefs
|
||||||
|
|
||||||
|
(defrecord MyFoo [] Object (toString [_] "v1"))
|
||||||
|
(str (thaw (freeze (MyFoo.))))
|
||||||
|
(defrecord MyFoo [] Object (toString [_] "v2"))
|
||||||
|
|
||||||
|
(deftest _redefs
|
||||||
|
(is (= (str (thaw (freeze (MyFoo.)))) "v2")))
|
||||||
|
|
||||||
;;;; Benchmarks
|
;;;; Benchmarks
|
||||||
|
|
||||||
(deftest _benchmarks
|
(deftest _benchmarks
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue