Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ASCII-8BIT encoding to BINARY #5571

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

casperisfine
Copy link
Contributor

[Feature #18576]

Ref: https://bugs.ruby-lang.org/issues/18576

ASCII-8BIT is now an alias to BINARY

@@ -160,7 +160,7 @@ static VALUE transcode_io(VALUE src, int * parser_encoding)
return src;
}

/* Just guess on ASCII-8BIT */
/* Just guess on BINARY */
if (io_external_enc_index == rb_ascii8bit_encindex()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this proposal keep ascii8bit name in C API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could alias it as well, but since C-extensions are usually written by more advanced users it's not that useful I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would advocate for consistency across C and ruby

@byroot byroot marked this pull request as ready for review February 21, 2022 09:46
kou pushed a commit to test-unit/test-unit that referenced this pull request Feb 21, 2022
Ref: https://bugs.ruby-lang.org/issues/18576
Ref: ruby/ruby#5571

I'd like to rename `ASCII-8BIT` into `BINARY` for Ruby 3.2, and
since test-unit's test suite is integrated into Ruby it breaks the
build.

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
[Feature #18576]

`ASCII-8BIT` is now an alias to `BINARY`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants