From: sawadatsuyoshi@... Date: 2014-10-06T14:55:49+00:00 Subject: [ruby-core:65442] [ruby-trunk - Feature #10332] [Open] Rational literal for mixed fractions Issue #10332 has been reported by Tsuyoshi Sawada. ---------------------------------------- Feature #10332: Rational literal for mixed fractions https://bugs.ruby-lang.org/issues/10332 * Author: Tsuyoshi Sawada * Status: Open * Priority: Normal * Assignee: * Category: * Target version: ---------------------------------------- Current behavior of rational literal and `String#to_r` does not recognize mixed fractions. Mixed fraction is not rare, and is frequently used in places such as US length measurement. ![drill bits](http://www.strongtie.com/graphics/anchorsystems/catalog/tables/217b-2012.gif) I propose that rational literal and `String#to_r` should be extended to handle mixed fractions. Perhaps something like: ~~~ruby 8 1/2r #=> (17/2) "8 1/2".to_r #=> (17/2) ~~~ or ~~~ruby (8 1/2)r #=> (17/2) ~~~ -- https://bugs.ruby-lang.org/