[Rcpp-commits] r2136 - in pkg/Rcpp: R tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Sep 19 17:22:35 CEST 2010
Author: jmc
Date: 2010-09-19 17:22:35 +0200 (Sun, 19 Sep 2010)
New Revision: 2136
Modified:
pkg/Rcpp/R/Module.R
pkg/Rcpp/tests/modref.R
Log:
bug in initializing: has to callNextMethod()
Modified: pkg/Rcpp/R/Module.R
===================================================================
--- pkg/Rcpp/R/Module.R 2010-09-18 13:40:43 UTC (rev 2135)
+++ pkg/Rcpp/R/Module.R 2010-09-19 15:22:35 UTC (rev 2136)
@@ -102,6 +102,7 @@
# field
cpp_object_initializer <- function(CLASS){
function(.Object, ...){
+ .Object <- callNextMethod(.Object)
selfEnv <- as.environment(.Object)
## generate the C++-side object and store its pointer, etc.
pointer <- selfEnv$.pointer
Modified: pkg/Rcpp/tests/modref.R
===================================================================
--- pkg/Rcpp/tests/modref.R 2010-09-18 13:40:43 UTC (rev 2135)
+++ pkg/Rcpp/tests/modref.R 2010-09-19 15:22:35 UTC (rev 2136)
@@ -49,8 +49,9 @@
ww$set("Other")
+## test independence of ww, wg
stopifnot(all.equal(ww$greet(), "Other"),
- all.equal(wg$greet(), "Other"))
+ all.equal(wg$greet(), wgg))
World$methods(
twice = function() paste(greet(), greet()))
More information about the Rcpp-commits
mailing list