ruby-changes:12269
From: tadf <ko1@a...>
Date: Sun, 5 Jul 2009 20:44:51 +0900 (JST)
Subject: [ruby-changes:12269] Ruby:r23960 (trunk): * complex.c (float_arg): returns PI for -0.0.
tadf 2009-07-05 20:44:34 +0900 (Sun, 05 Jul 2009) New Revision: 23960 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23960 Log: * complex.c (float_arg): returns PI for -0.0. Modified files: trunk/ChangeLog trunk/complex.c Index: complex.c =================================================================== --- complex.c (revision 23959) +++ complex.c (revision 23960) @@ -1756,7 +1756,9 @@ { if (isnan(RFLOAT_VALUE(self))) return self; - return rb_call_super(0, 0); + if (f_tpositive_p(self)) + return INT2FIX(0); + return rb_const_get(rb_mMath, id_PI); } /* Index: ChangeLog =================================================================== --- ChangeLog (revision 23959) +++ ChangeLog (revision 23960) @@ -1,3 +1,7 @@ +Sun Jul 5 20:40:35 2009 Tadayoshi Funaba <tadf@d...> + + * complex.c (float_arg): returns PI for -0.0. + Sun Jul 5 14:04:36 2009 Nobuyoshi Nakada <nobu@r...> * thread.c (rb_threadptr_exec_event_hooks): new function to -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/