Project

General

Profile

Actions

Bug #12975

closed

Edit documentation for IO#print function

Added by da1chy (Dario Daic) over 7 years ago. Updated about 7 years ago.

Status:
Closed
Target version:
-
ruby -v:
2.3.0
[ruby-core:78291]

Description

Important changes made:

  • Delete a duplicate sentence relating to a description of global variable $_
  • Split the whole paragraph into three semantically related smaller ones.
    To make it easier to digest the content.
  • Emphasize names of separators. To make a distinction between each one.
    They are similar both in naming and their functions.
  • Add "and is a string" where usage of $' and $\ is explained.
    When assigning any other value then a string to each of them,
    Ruby throws a TypeError. It seems like a valid point to highlight.

Files

Actions #1

Updated by stomar (Marcus Stollsteimer) about 7 years ago

  • Status changed from Open to Closed

Applied in changeset r57780.


docs for IO#print

  • io.c: [DOC] split documentation for IO#print into smaller paragraphs,
    delete duplicate sentence, fix call-seq.
    Based on a patch by Dario Daic. [ruby-core:78291] [Bug #12975]

Updated by stomar (Marcus Stollsteimer) about 7 years ago

Dario Daic wrote:

  • Add "and is a string" where usage of $' and $\ is explained.
    When assigning any other value then a string to each of them,
    Ruby throws a TypeError. It seems like a valid point to highlight.

Applied without this restraint, since it doesn't make sense: these variables must reference a string (or nil), since the type is validated during assignment, as you wrote yourself. The TypeError doesn't affect print.

I also modified the grouping a bit (what it does in general; preconditions and argument handling; separators).

Updated by naruse (Yui NARUSE) about 7 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE

ruby_2_4 r57929 merged revision(s) 57780.

Actions #4

Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE

Updated by usa (Usaku NAKAMURA) about 7 years ago

  • Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE to 2.2: DONE, 2.3: REQUIRED, 2.4: DONE

ruby_2_2 r58104 merged revision(s) 57780.

Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago

  • Backport changed from 2.2: DONE, 2.3: REQUIRED, 2.4: DONE to 2.2: DONE, 2.3: DONE, 2.4: DONE

ruby_2_3 r58168 merged revision(s) 57780.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0