mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Split long expression
This commit is contained in:
parent
4946c3e4b5
commit
0d41adf6e2
1 changed files with 4 additions and 5 deletions
|
@ -845,12 +845,11 @@ f_divide(VALUE self, VALUE other,
|
||||||
return f_complex_new2(CLASS_OF(self), x, y);
|
return f_complex_new2(CLASS_OF(self), x, y);
|
||||||
}
|
}
|
||||||
if (k_numeric_p(other) && f_real_p(other)) {
|
if (k_numeric_p(other) && f_real_p(other)) {
|
||||||
|
VALUE x, y;
|
||||||
get_dat1(self);
|
get_dat1(self);
|
||||||
return f_complex_new2(CLASS_OF(self),
|
x = rb_rational_canonicalize((*func)(dat->real, other));
|
||||||
rb_rational_canonicalize(
|
y = rb_rational_canonicalize((*func)(dat->imag, other));
|
||||||
(*func)(dat->real, other)),
|
return f_complex_new2(CLASS_OF(self), x, y);
|
||||||
rb_rational_canonicalize(
|
|
||||||
(*func)(dat->imag, other)));
|
|
||||||
}
|
}
|
||||||
return rb_num_coerce_bin(self, other, id);
|
return rb_num_coerce_bin(self, other, id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue