зеркало из https://github.com/github/ruby.git
* complex.c: trivial changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a81206ae3f
Коммит
583400c15e
|
@ -1,3 +1,7 @@
|
|||
Sun Sep 14 18:33:32 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* complex.c: trivial changes.
|
||||
|
||||
Sun Sep 14 16:15:22 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||
|
||||
* lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?".
|
||||
|
|
17
complex.c
17
complex.c
|
@ -377,12 +377,14 @@ nucomp_s_canonicalize(int argc, VALUE *argv, VALUE klass)
|
|||
|
||||
switch (rb_scan_args(argc, argv, "11", &real, &image)) {
|
||||
case 1:
|
||||
nucomp_real_check(real);
|
||||
image = ZERO;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
nucomp_real_check(real);
|
||||
nucomp_real_check(image);
|
||||
break;
|
||||
}
|
||||
|
||||
return nucomp_s_canonicalize_internal(klass, real, image);
|
||||
}
|
||||
|
@ -395,12 +397,14 @@ nucomp_s_new(int argc, VALUE *argv, VALUE klass)
|
|||
|
||||
switch (rb_scan_args(argc, argv, "11", &real, &image)) {
|
||||
case 1:
|
||||
nucomp_real_check(real);
|
||||
image = ZERO;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
nucomp_real_check(real);
|
||||
nucomp_real_check(image);
|
||||
break;
|
||||
}
|
||||
|
||||
return nucomp_s_canonicalize_internal(klass, real, image);
|
||||
}
|
||||
|
@ -1125,9 +1129,8 @@ string_to_c_internal(VALUE self)
|
|||
}
|
||||
if (NIL_P(m)) {
|
||||
m = f_match(comp_pat2, s);
|
||||
if (NIL_P(m)) {
|
||||
if (NIL_P(m))
|
||||
return rb_assoc_new(Qnil, self);
|
||||
}
|
||||
sr = f_aref(m, INT2FIX(1));
|
||||
if (NIL_P(f_aref(m, INT2FIX(2))))
|
||||
si = Qnil;
|
||||
|
@ -1495,5 +1498,5 @@ Init_Complex(void)
|
|||
/*
|
||||
Local variables:
|
||||
c-file-style: "ruby"
|
||||
end:
|
||||
End:
|
||||
*/
|
||||
|
|
|
@ -1596,5 +1596,5 @@ Init_Rational(void)
|
|||
/*
|
||||
Local variables:
|
||||
c-file-style: "ruby"
|
||||
end:
|
||||
End:
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче