ruby-changes:12207
From: tadf <ko1@a...>
Date: Mon, 29 Jun 2009 20:31:24 +0900 (JST)
Subject: [ruby-changes:12207] Ruby:r23892 (trunk): * rational.c (float_to_r): always returns rational.
tadf 2009-06-29 20:31:03 +0900 (Mon, 29 Jun 2009) New Revision: 23892 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23892 Log: * rational.c (float_to_r): always returns rational. Modified files: trunk/ChangeLog trunk/rational.c Index: ChangeLog =================================================================== --- ChangeLog (revision 23891) +++ ChangeLog (revision 23892) @@ -1,3 +1,7 @@ +Mon Jun 29 20:29:11 2009 Tadayoshi Funaba <tadf@d...> + + * rational.c (float_to_r): always returns rational. + Mon Jun 29 18:55:55 2009 Nobuyoshi Nakada <nobu@r...> * dln.c (dln_find_1): fix for files with dots. [ruby-dev:38588] Index: rational.c =================================================================== --- rational.c (revision 23891) +++ rational.c (revision 23892) @@ -1680,7 +1680,7 @@ VALUE f, n; float_decode_internal(self, &f, &n); - return f_mul(f, f_expt(INT2FIX(FLT_RADIX), n)); + return f_to_r(f_mul(f, f_expt(INT2FIX(FLT_RADIX), n))); } static VALUE rat_pat, an_e_pat, a_dot_pat, underscores_pat, an_underscore; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/