Skip to content

[DOC] Update docs for rb_interned_str and related functions#15897

Merged
nobu merged 1 commit intoruby:masterfrom
herwinw:rb_interned_str_docs
Jan 19, 2026
Merged

[DOC] Update docs for rb_interned_str and related functions#15897
nobu merged 1 commit intoruby:masterfrom
herwinw:rb_interned_str_docs

Conversation

@herwinw
Copy link
Copy Markdown
Member

@herwinw herwinw commented Jan 18, 2026

  • rb_interned_str: document what decides whether the returned string is in US-ASCII or BINARY encoding.
  • rb_interned_str_cstr: include the same description as rb_interned_str for the encoding. This one was still missing the update for US-ASCII and erroneously said the returned string was alwasy in BINARY encoding
  • rb_str_to_interned_str: document how the encoding of the result is defined.

* rb_interned_str: document what decides whether the returned string is
  in US-ASCII or BINARY encoding.
* rb_interned_str_cstr: include the same description as rb_interned_str
  for the encoding. This one was still missing the update for US-ASCII
  and erroneously said the returned string was alwasy in BINARY encoding
* rb_str_to_interned_str: document how the encoding of the result is
  defined.
@herwinw
Copy link
Copy Markdown
Member Author

herwinw commented Jan 18, 2026

This relates to the changes in https://bugs.ruby-lang.org/issues/21842

@nobu nobu merged commit b4a62a1 into ruby:master Jan 19, 2026
52 checks passed
@herwinw herwinw deleted the rb_interned_str_docs branch January 19, 2026 07:34
k0kubun added a commit that referenced this pull request Feb 9, 2026
	[PATCH] [Bug #21842] Let `rb_interned_str` return US-ASCII if possible

	[PATCH] [DOC] Update docs for rb_interned_str and related functions (#15897)

	Related to [Bug #21842].

	* rb_interned_str: document what decides whether the returned string is
	  in US-ASCII or BINARY encoding.
	* rb_interned_str_cstr: include the same description as rb_interned_str
	  for the encoding. This one was still missing the update for US-ASCII
	  and erroneously said the returned string was alwasy in BINARY encoding
	* rb_str_to_interned_str: document how the encoding of the result is
	  defined.

	Co-authored-by: Herwin <herwinw@users.noreply.github.com>
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.

2 participants