Project

General

Profile

Actions

Feature #20261

open

Add symbol synonyms for '' and nil for IO method line separator arguments

Added by burdettelamar (Burdette Lamar) 3 months ago. Updated about 1 month ago.

Status:
Assigned
Target version:
-
[ruby-core:116684]

Description

[Feature 20261] For IO's line-oriented read methods, there are two special values for the line-separator argument sep; I'm proposing to add (user-friendlier) symbol synonyms for those values:

  • :paragraph as synonym for '' (read paragraphs).
  • :slurp as synonym for nil (read all).

Details (code, documentation, tests) may be seen at https://github.com/ruby/ruby/pull/9921.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0