Is `:perm` missing in `IO.write` and `Pathname#write`?
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.2k
- Forks
- 256
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 37
Description
I noticed that the IO.write and Pathname#write method definitions do not have a :perm option.
https://github.com/ruby/rbs/blob/c922491270703787716c022774ad7c8e61db1529/stdlib/builtin/io.rbs#L531
The related IO.write document says:
:perm
integer
Specifies the perm argument for open().
Then, I have the following questions:
-
Is there some reason for the missing
:permoption? -
Can we unify the common options' definitions? And does it make sense? Like this:
# IO def self.write: (String name, _ToS content, ?Integer offset, ?open_args options) -> Integer # Pathname def write: (String content, ?Integer offset, ?open_args options) ->
See also:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with stdlib/builtin/io.rbs around line 531 and stdlib/pathname/pathname.rbs around lines 1029-1039, then compare the linked IO and Pathname documentation for their write options. Determine whether :perm is missing and whether the shared options should be represented consistently; done means the signatures and any rationale match the documented APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100