Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#getss, #readlines and #readliness *also* accept chomp: true #2212

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ParadoxV5
Copy link
Contributor

@ParadoxV5 ParadoxV5 commented Dec 28, 2024


Test for ARGF and StringIO are included.
Testing Kernel currently unavailable due to Broken Windows Theory.
Testing OpenSSL::Buffering TBA… how do we use this thing?

@ParadoxV5 ParadoxV5 changed the title Kernel#gets and ARGF#gets *also* accept chomp: true #getss, #readlines and #readliness *also* accept chomp: true Jan 24, 2025
@soutaro soutaro added this to the RBS 3.9 milestone Jan 24, 2025
@ParadoxV5 ParadoxV5 marked this pull request as draft January 24, 2025 03:33
(wow how many `chomp: true`s are there)
* Kernel
* ARGF
* StringIO
* OpenSSL::Buffering
@ParadoxV5 ParadoxV5 marked this pull request as ready for review January 24, 2025 03:41
@ParadoxV5
Copy link
Contributor Author

ParadoxV5 commented Jan 24, 2025

Here we go @soutaro. Force-pushed to fix my copy-paste and rebased to latest master while there

@ParadoxV5
Copy link
Contributor Author

Oh BTW,

I tried to implement a test for Kernel#readlines through ARGV, but it blocks on the second call during the test. 😢

Have we tried subbing out $stdin?


Backstory:
I used (toplevel) gets(chomp: true) frequently for Advent of Code 2024.
Then just recently I realized I could use readline instead to skip the nil warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants