Skip to content

Conversation

@HoneyryderChuck
Copy link
Contributor

this adds the missing kwargs (known as "Open options" and "Encoding options" in the docs) signatures to the following methods, which implemented the same derivative signature:

  • File#initialize
  • File.open
  • Pathname#open

As a sidenote, given the number of methods which reimplement the same signature, it'd be great if RBS itself could support some type of annotation to avoid repetition, something like:

class Pathname
  route open -> File#initialize

@ksss
Copy link
Collaborator

ksss commented Jan 14, 2026

The situation where RBS/Layout/CommentIndentation doesn't need to be flagged appears to be the case.
It's an issue with rubocop-on-rbs, so I will fix it.

@ksss
Copy link
Collaborator

ksss commented Jan 14, 2026

And we need test code.

@HoneyryderChuck
Copy link
Contributor Author

added.

this adds the missing kwargs (known as "Open options" and "Encoding
options" in the docs) signatures to the following methods, which
implemented the same derivative signature:

* File#initialize
* File.open
* Pathname#open
@HoneyryderChuck
Copy link
Contributor Author

@ksss anything missing?

Copy link
Collaborator

@ksss ksss left a comment

Choose a reason for hiding this comment

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

Great! Thanks!

@ksss ksss merged commit 57f58fa into ruby:master Jan 23, 2026
20 checks passed
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