]> rhodes.io Git - swankr.git/commitdiff
Christophe Weblog Wiki Code Publications Music
get definitions (use of <-) to work in the REPL
authorChristophe Rhodes <csr21@cantab.net>
Fri, 13 Aug 2010 16:00:22 +0000 (17:00 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 13 Aug 2010 16:00:22 +0000 (17:00 +0100)
the REPL now evaluates with envir=globalenv(), rather than in the
environment of `swank:listener-eval`...

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)