mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make new object for negated float as Float
is always frozen now
This commit is contained in:
parent
37395ffa05
commit
e1ecda297e
1 changed files with 1 additions and 1 deletions
2
parse.y
2
parse.y
|
@ -11924,7 +11924,7 @@ negate_lit(struct parser_params *p, VALUE lit)
|
|||
RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
|
||||
break;
|
||||
case T_FLOAT:
|
||||
RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
|
||||
lit = DBL2NUM(-RFLOAT_VALUE(lit));
|
||||
break;
|
||||
unknown:
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue