Project

General

Profile

Feature #10366

New inspection form for rational

Added by sawa (Tsuyoshi Sawada) almost 5 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:65606]

Description

Currently, rational inspection is expressed with parentheses:

(2/51)

If this were taken as a Ruby expression, it would mean integer division, whose value is 0 in this case. It does not make much sense to express that it is indeed not integer division and that it is rational by using parentheses. Now that we have rational literal using r, we can make the inspection form as:

2/51r

This would be much less confusing.

Also available in: Atom PDF