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

Document mandatory require for using io/wait methods #10

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

apatniv
Copy link
Contributor

@apatniv apatniv commented Jan 24, 2022

Currently, the IO Method documentation doesn't indicate io/wait is required for some of the methods.

Currently, for a beginner this will result in errors which are very hard to debug. For example:

(ins)) ruby experiments.rb
experiments.rb:1:in `<main>': undefined method `nread' for #<IO:<STDIN>> (NoMethodError)
Did you mean?  read
               pread


(ins)) cat experiments.rb 
puts $stdin.nread

(ins)) ruby --version
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-darwin20]

@nobu nobu added the documentation Improvements or additions to documentation label Jan 24, 2022
@nobu nobu merged commit 2beb05b into ruby:master Jan 24, 2022
@apatniv
Copy link
Contributor Author

apatniv commented Jan 24, 2022

Thank you @nobu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Development

Successfully merging this pull request may close these issues.

2 participants