Skip to content

Adapt to utils:::print.bitstring#310

Open
MichaelChirico wants to merge 3 commits intomainfrom
use-bitstring
Open

Adapt to utils:::print.bitstring#310
MichaelChirico wants to merge 3 commits intomainfrom
use-bitstring

Conversation

@MichaelChirico
Copy link
Copy Markdown
Collaborator

@MichaelChirico MichaelChirico commented Mar 27, 2026

Closes #295

cc @deepayan

Beyond just passing my silly test, here's the "actual experience" of using bitstring on ancient R:

library(bit64)

# the correct method is registered by .onLoad when it's missing from {utils}
getS3method("print", "bitstring")
# function (x, ...) 
# {
#     reset_class = minusclass(class(x), "bitstring")
#     attributes(x) = NULL
#     oldClass(x) = reset_class
#     NextMethod(x)
# }
# <bytecode: 0x5c590d7083e8>
# <environment: 0x5c590d7021d8>

# the new attributes are omitted
print(as.bitstring(lim.integer64()))
# [1] "1000000000000000000000000000000000000000000000000000000000000001"
# [2] "0111111111111111111111111111111111111111111111111111111111111111"

@MichaelChirico
Copy link
Copy Markdown
Collaborator Author

devel issue is an ongoing {rlang} outage; ignoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CRAN failure in r-devel due to new bitstring class

1 participant