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

Fix DEVNULL docs #6642

Merged
merged 1 commit into from
Sep 10, 2018
Merged

Fix DEVNULL docs #6642

merged 1 commit into from
Sep 10, 2018

Conversation

wooster0
Copy link
Contributor

@wooster0 wooster0 commented Sep 2, 2018

Currently there are no docs for the DEVNULL constant.
That's because there's a line generated at the macro between the comment and the constant:

  # The name of the null device on the host platform. `/dev/null` on UNIX and `NUL`
  # on win32.
  #
  # When this device is opened using `File.open`, read operations will always
  # return EOF, and any data written will be immediately discarded.
  #
  # ```
  # File.open(File::DEVNULL) do |file|
  #   file.puts "this is discarded"
  # end
  # ```

    DEVNULL = "/dev/null"

This fixes it.

@asterite
Copy link
Member

asterite commented Sep 2, 2018

The description doesn't match the diff.

@wooster0
Copy link
Contributor Author

wooster0 commented Sep 2, 2018

@asterite I'm sorry what do you mean?

@asterite
Copy link
Member

Oooh... sorry, the line is in the generated macro, not in the code. I see. This makes sense.

@RX14 RX14 added this to the 0.27.0 milestone Sep 10, 2018
@RX14 RX14 merged commit cff9245 into crystal-lang:master Sep 10, 2018
@RX14 RX14 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:docs topic:stdlib labels Sep 10, 2018
ezrast pushed a commit to ezrast/crystal that referenced this pull request Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:docs topic:stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants