Project

General

Profile

Bug #8717 ยป 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

View differences:

parse.y
| tUMINUS_NUM tRATIONAL %prec tLOWEST
{
/*%%%*/
$$ = negate_lit($2);
$$ = NEW_CALL($2, tUMINUS, 0);
/*%
$$ = dispatch2(unary, ripper_intern("-@"), $2);
%*/
......
| tUMINUS_NUM tIMAGINARY %prec tLOWEST
{
/*%%%*/
$$ = negate_lit($2);
$$ = NEW_CALL($2, tUMINUS, 0);
/*%
$$ = dispatch2(unary, ripper_intern("-@"), $2);
%*/
    (1-1/1)