Christophe Weblog Wiki Code Publications Music
get definitions (use of <-) to work in the REPL
[swankr.git] / swank.R
diff --git a/swank.R b/swank.R
index 71d502ecc03039de80f2de99401c8003d98cb963..dc5cbd165e7204384d1940a16d6e252ac7b8351d 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -239,7 +239,7 @@ writeSexpToString <- function(obj) {
 }
 
 `swank:listener-eval` <- function(io, sldbState, string) {
-  val <- eval(parse(text=string))
+  val <- eval(parse(text=string), envir = globalenv())
   f <- fifo("")
   sink(f)
   print(val)