Issue #10331 has been reported by Tsuyoshi Sawada.

----------------------------------------
Feature #10331: String#to_r to recognize negative denominators
https://bugs.ruby-lang.org/issues/10331

* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
Current behavior or `String#to_r` does not recognize negative denominators. This can lead to confusing results:

~~~ruby
"1/-3".to_r
#=> (1/1)
~~~

I propose negative denominators to be recognized.

~~~ruby
"1/-3".to_r
#=> (-1/3)
~~~



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