From: "burdettelamar (Burdette Lamar) via ruby-core" Date: 2024-02-19T16:08:58+00:00 Subject: [ruby-core:116849] [Ruby master Feature#20261] Add symbol synonyms for '' and nil for IO method line separator arguments Issue #20261 has been updated by burdettelamar (Burdette Lamar). Assignee set to burdettelamar (Burdette Lamar) Propose to add user-friendly synonyms (symbols) for IO line separator arguments `''` (read paragraphs) and `nil` (read all). New symbol arguments would be `:paragraph` and `:slurp`. (I think this use of the term _slurp_ is common in Perl and Python.) ---------------------------------------- Feature #20261: Add symbol synonyms for '' and nil for IO method line separator arguments https://bugs.ruby-lang.org/issues/20261#change-106880 * Author: burdettelamar (Burdette Lamar) * Status: Open * Priority: Normal * Assignee: burdettelamar (Burdette Lamar) ---------------------------------------- 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. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/