diff --git a/DESCRIPTION b/DESCRIPTION index 589ec22..43c7899 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,4 +22,4 @@ Suggests: Config/Needs/website: tidyverse/tidytemplate, ggplot2, microbenchmark, scales Config/testthat/edition: 3 Encoding: UTF-8 -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 diff --git a/NAMESPACE b/NAMESPACE index b252431..b78d9e7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +S3method(.DollarNames,R6) S3method(as.list,R6) S3method(format,R6) S3method(format,R6ClassGenerator) diff --git a/NEWS.md b/NEWS.md index 01c085e..f047ce3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ R6 2.5.1.9000 ======== +* R6 methods no longer recommends `initialize` or `.__enclos_env__` in autocomplete. + * The deprecated `lock` parameter has been removed. * `R6Class()` now prints a message when a `finalize` method is public instead of private. diff --git a/R/r6_class.R b/R/r6_class.R index 5aaf8f7..e35eb2b 100644 --- a/R/r6_class.R +++ b/R/r6_class.R @@ -541,3 +541,9 @@ R6Class <- encapsulate(function(classname = NULL, public = list(), generator }) + +#' @export +.DollarNames.R6 <- function(x, pattern) { + names <- NextMethod() + names <- setdiff(names, c(".__enclos_env__", "initialize")) +}