Skip to content

Remove StringScanner methods absent from the latest Ruby release#2961

Merged
ksss merged 1 commit into
ruby:masterfrom
zonuexe:fix/remove-obsolete-strscan-methods
May 21, 2026
Merged

Remove StringScanner methods absent from the latest Ruby release#2961
ksss merged 1 commit into
ruby:masterfrom
zonuexe:fix/remove-obsolete-strscan-methods

Conversation

@zonuexe
Copy link
Copy Markdown
Contributor

@zonuexe zonuexe commented May 20, 2026

Summary

StringScanner#clear, #empty?, #getbyte, #peep, and #restsize have been obsolete for over two decades and were removed from strscan 3.1.6, which is bundled with the latest Ruby release (ruby/strscan@1387def).

Per docs/CONTRIBUTING.md, RBS targets the latest release of Ruby, so this drops the definitions of methods that no longer exist there.

Test plan

  • bundle exec rbs -r strscan validate
  • bundle exec rubocop stdlib/strscan/0/string_scanner.rbs

StringScanner#clear, #empty?, #getbyte, #peep, and #restsize were
obsolete for over two decades and were removed from strscan 3.1.6,
bundled with the latest Ruby release. RBS targets the latest release
of Ruby, so drop their definitions.
@ksss
Copy link
Copy Markdown
Collaborator

ksss commented May 21, 2026

@ksss ksss merged commit 32c671e into ruby:master May 21, 2026
24 of 25 checks passed
@zonuexe zonuexe deleted the fix/remove-obsolete-strscan-methods branch May 21, 2026 05:00
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