Skip to content

setDT() on a get()-returned object no longer works as intended #6725

Description

@MichaelChirico

This is a pretty minimal reprex of a regression that might solve #6575 and was extracted from the tests in {DTwrappers}:

https://github.com/cran/DTwrappers/blob/e730e04e9164aa333339955375d6c225f7609fcc/tests/testthat/test-dtwrappers.R#L11-L17

x = data.frame(a = 1)
e = environment()
foo = function() {
  setDT(get('x', envir=e))
}
foo()

is.data.table(x)
## 1.16.4
# [1] TRUE

## current master
# [1] FALSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions