Project

General

Profile

Actions

Bug #8717

closed

Negation of a rational/imaginary number literal isn't working

Added by takuto_h (Takuto Hayashi) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-08-02 trunk 42320) [x86_64-linux]
[ruby-core:56316]

Description

Hello.
I've found that negation of a rational/imaginary number literal isn't working.

irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 2.1.0dev (2013-08-02 trunk 42320) [x86_64-linux]"
irb(main):002:0> -3r
=> (3/1)
irb(main):003:0> -2i
=> (0+2i)
irb(main):004:0> 

The attached file is a patch to fix this bug.
Thanks.


Files

negate_ratio_lit.patch (851 Bytes) negate_ratio_lit.patch Bug fix for the negation of a rational/imaginary number literal takuto_h (Takuto Hayashi), 08/02/2013 10:03 AM
Actions

Also available in: Atom PDF

Like0
Like0