Skip to content

Commit bed8e32

Browse files
authored
fix: correct + method dispatch behavior for R >= 4.3.0 (#6561)
1 parent ba21a7b commit bed8e32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/zzz.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ on_load(
3131
}
3232
)
3333

34+
# In R >= 4.3.0, S7 methods fall back to base Ops behavior when one of the
35+
# arguments is not an S7 object. This ensures compatibility in such cases.
3436
on_load(
35-
if (getRversion() > "4.3.0") registerS3method("+", "gg", add_gg)
37+
if (getRversion() >= "4.3.0") registerS3method("+", "gg", add_gg)
3638
)
3739

3840
on_load(S7::methods_register())

0 commit comments

Comments
 (0)