Closed t-kalinowski closed 1 week ago
Side note: I also updated is_fr_field()
to use S7_inherits()
instead of base::inherits()
, to help future-proof against any further changes to the S3 class of S7 objects.
If you’re targeting only R versions >= 4.3.0, you can also pass the fr_field
object directly to base::inherits()
like this:
inherits(x, fr_field)
great news! i've had a lot of trouble in the past with incorporating the package name into the class. i'll take a look very soon!
thank you! sending this updated version to CRAN now.
Starting with S7 0.2.0,
S7::new_class()
automatically infers the package name, which changes the S3 class of S7 objects defined in a package and causes tests likeexpect_s3_class(fr_field(), "fr_field")
to fail. By default, the S3 class name now includes the package name.This patch preserves the current S3 class name for S7 classes defined by the package. Alternatively, you could update the tests to use the new S3 class, e.g.,
or,