Skip to content

Commit 111fe4b

Browse files
committed
mruby-compiler: generate OP_SSEND from Complex and Rational literals
1 parent 4a0e806 commit 111fe4b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mrbgems/mruby-compiler/core/parse.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,14 +1015,14 @@ new_op_asgn(parser_state *p, node *a, mrb_sym op, node *b)
10151015
static node*
10161016
new_imaginary(parser_state *p, node *imaginary)
10171017
{
1018-
return new_call(p, new_const(p, MRB_SYM_2(p->mrb, Kernel)), MRB_SYM_2(p->mrb, Complex),
1019-
new_callargs(p, list2(list3((node*)NODE_INT, (node*)strdup("0"), nint(10)), imaginary), 0, 0), '.');
1018+
return new_fcall(p, MRB_SYM_2(p->mrb, Complex),
1019+
new_callargs(p, list2(list3((node*)NODE_INT, (node*)strdup("0"), nint(10)), imaginary), 0, 0));
10201020
}
10211021

10221022
static node*
10231023
new_rational(parser_state *p, node *rational)
10241024
{
1025-
return new_call(p, new_const(p, MRB_SYM_2(p->mrb, Kernel)), MRB_SYM_2(p->mrb, Rational), new_callargs(p, list1(rational), 0, 0), '.');
1025+
return new_fcall(p, MRB_SYM_2(p->mrb, Rational), new_callargs(p, list1(rational), 0, 0));
10261026
}
10271027

10281028
/* (:int . i) */

0 commit comments

Comments
 (0)