Project

General

Profile

Actions

Feature #18410

open

Proposal to make inspect include underscores on numerics

Added by brightbits (Michael Baldry) almost 3 years ago. Updated almost 3 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:106701]

Description

The documentation for inspect reads "Returns a string containing a human-readable representation of obj." but for large numerical values, while 964218442 is human-readable, 964_218_442 is a lot more readable. The language allows the use of underscores to make numbers more readable, so why should inspect not also honour this?

Happy to provide a patch if this would be an acceptable change.


Related issues 2 (1 open1 closed)

Related to Ruby master - Feature #16011: Digit groupingRejectedmatz (Yukihiro Matsumoto)Actions
Related to Ruby master - Feature #17339: Semantic grouping with BigDecimal#to_sAssignedmrkn (Kenta Murata)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0