From b3e3c25bbe9491c1fc7740d947086e26370304c0 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Mon, 19 Aug 2024 14:00:52 +0200 Subject: [PATCH] fix weird case --- R/dots.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/dots.R b/R/dots.R index 3a4d11361..83b9fbcb4 100644 --- a/R/dots.R +++ b/R/dots.R @@ -432,7 +432,7 @@ homonym_enum <- function(nm, dups, nms) { # `x` always end up on the names of the output list, # unlike `as.list.factor()`. rlang_as_list <- function(x) { - if (inherits(x, "list")) { + if ("list" %in% class(x)) { # `x` explicitly inherits from `"list"`, which we take it to mean # that it has list storage (i.e. it's not a class like POSIXlt, # it's not proxied, and it's not a scalar object like `"lm"`)