In R-devel, with the environment var _R_ENV2LIST_BUGFIX_=true, the as.list.environment() function no longer gives the function associated with an active binding; it calls the function and gives the returned value instead. This will become the default (probably) in R 4.0.
This buggy behavior was used when cloning an R6 object with active bindings. This PR fixes the issue by storing the functions for active bindings separately, if the object is cloneable.
In R-devel, with the environment var
_R_ENV2LIST_BUGFIX_=true
, theas.list.environment()
function no longer gives the function associated with an active binding; it calls the function and gives the returned value instead. This will become the default (probably) in R 4.0.This buggy behavior was used when cloning an R6 object with active bindings. This PR fixes the issue by storing the functions for active bindings separately, if the object is cloneable.