Skip to content

Commit 8fd7789

Browse files
try setattr
1 parent b19acf1 commit 8fd7789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/autoprint.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ local({
5858

5959
# child class of data.table doesn't induce unintended print, #3029
6060
dt = data.table(x = 1)
61-
class(dt) = c("foo", "data.table", "data.frame")
61+
setattr(dt, "class", c("foo", "data.table", "data.frame"))
6262
print.foo = function(x, ...) {
6363
NextMethod("print")
6464
}

0 commit comments

Comments
 (0)