Skip to content

Add missing definitions for text processing standard libraries (pp, shellwords, strscan) - #3172

Open
zonuexe wants to merge 1 commit into
ruby:masterfrom
zonuexe:fix/stdlib-missing-text-formatting
Open

zonuexe wants to merge 1 commit into
ruby:masterfrom
zonuexe:fix/stdlib-missing-text-formatting

Conversation

@zonuexe

@zonuexe zonuexe commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Add missing methods, classes, and constants for pp, shellwords, and strscan.

Note: abbrev, base64, and nkf have been excluded as they are in ALUMNI_STDLIBS and planned to be removed from the rbs repo.

Changes

Ruby Method Change C function
PP#pp_hash_pair Add method pp_hash_pair returning void https://github.com/ruby/pp/blob/master/lib/pp.rb
PP::VERSION Add constant VERSION https://github.com/ruby/pp/blob/master/lib/pp.rb
Shellwords::VERSION Add constant VERSION https://github.com/ruby/shellwords/blob/master/lib/shellwords.rb
StringScanner::Error Add exception class inheriting StandardError https://github.com/ruby/strscan/blob/master/ext/strscan/strscan.c

@ksss ksss left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

abbrev, base64, and nkf are planned to be removed from the rbs repo.
Please submit your requests to each gem.

ALUMNI_STDLIBS = {
"mutex_m" => ">= 0.3.0",
"abbrev" => nil,
"base64" => nil,
"benchmark" => nil,
"bigdecimal" => nil,
"csv" => nil,
"kconv" => nil,
"logger" => nil,
"minitest" => nil,
"net-smtp" => nil,
"nkf" => nil,
"observer" => nil,
"cgi" => nil,
"pstore" => nil,
}

@zonuexe
zonuexe force-pushed the fix/stdlib-missing-text-formatting branch from 0a48793 to 41f1a8a Compare September 27, 2026 07:29
…hellwords, strscan)

Add missing methods, classes, and constants for `pp`, `shellwords`, and `strscan`.

Note: `abbrev`, `base64`, and `nkf` have been excluded as they are in `ALUMNI_STDLIBS` and planned to be removed from the rbs repo.

| Ruby Method | Change | C function |
|---|---|---|
| `PP#pp_hash_pair` | Add method `pp_hash_pair` returning `void` | https://github.com/ruby/pp/blob/master/lib/pp.rb |
| `PP::VERSION` | Add constant `VERSION` | https://github.com/ruby/pp/blob/master/lib/pp.rb |
| `Shellwords::VERSION` | Add constant `VERSION` | https://github.com/ruby/shellwords/blob/master/lib/shellwords.rb |
| `StringScanner::Error` | Add exception class inheriting `StandardError` | https://github.com/ruby/strscan/blob/master/ext/strscan/strscan.c |
@zonuexe
zonuexe force-pushed the fix/stdlib-missing-text-formatting branch from 41f1a8a to cc92919 Compare September 27, 2026 07:31
@zonuexe zonuexe changed the title Add missing definitions for text processing and formatting standard libraries Add missing definitions for text processing standard libraries (pp, shellwords, strscan) Sep 27, 2026
@zonuexe

zonuexe commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for pointing this out! I have excluded abbrev, base64, and nkf from this PR, keeping only pp, shellwords, and strscan. I will submit separate PRs to each gem repository.
Also updated constant assertions in test files to use assert_const_type.

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