[ruby-core:79923] [Ruby trunk Bug#12975] Edit documentation for IO#print function

From: sto.mar@...
Date: 2017-03-05 12:54:34 UTC
List: ruby-core #79923
Issue #12975 has been updated by Marcus Stollsteimer.


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).

----------------------------------------
Bug #12975: Edit documentation for IO#print function
https://bugs.ruby-lang.org/issues/12975#change-63353

* Author: Dario Daic
* Status: Closed
* Priority: Normal
* Assignee: Eric Hodel
* Target version: 
* ruby -v: 2.3.0
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
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--------------------------------
0001-Edit-documentation-for-IO-print.patch (1.98 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next