Skip to content

Commit

Permalink
fix: sci classes properly named
Browse files Browse the repository at this point in the history
  • Loading branch information
dainiusjocas committed Feb 4, 2021
1 parent 67a09a4 commit c441c8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/polyglot/sci.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

(defn sci-compile [^String script]
(sci/eval-string script
{:classes {'UUID UUID
'Date Date}}))
{:classes {'java.util.UUID java.util.UUID
'java.util.Date java.util.Date}}))

(defn script->transform-fn [script]
(let [transform-fn (sci-compile script)]
Expand All @@ -29,4 +29,4 @@
(comment
((polyglot.sci/script->transform-fn-for-boost "(fn [& args] args)") 1 2 3)

((polyglot.sci/script->transform-fn-for-boost "(fn [& args] (Date.))") 1 2 3))
((polyglot.sci/script->transform-fn-for-boost "(fn [& args] (java.util.Date.))") 1 2 3))

0 comments on commit c441c8f

Please sign in to comment.