[前][次][番号順一覧][スレッド一覧]

ruby-changes:14703

From: nobu <ko1@a...>
Date: Thu, 4 Feb 2010 00:30:58 +0900 (JST)
Subject: [ruby-changes:14703] Ruby:r26559 (trunk): * time.c (quo, time_mdump): use RRATIONAL().

nobu	2010-02-04 00:29:15 +0900 (Thu, 04 Feb 2010)

  New Revision: 26559

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26559

  Log:
    * time.c (quo, time_mdump): use RRATIONAL().

  Modified files:
    trunk/time.c
    trunk/version.h

Index: time.c
===================================================================
--- time.c	(revision 26558)
+++ time.c	(revision 26559)
@@ -179,8 +179,8 @@
     VALUE ret;
     ret = rb_funcall((x), id_quo, 1, (y));
     if (TYPE(ret) == T_RATIONAL &&
-        ((struct RRational *)ret)->den == INT2FIX(1)) {
-        ret = ((struct RRational *)ret)->num;
+        RRATIONAL(ret)->den == INT2FIX(1)) {
+        ret = RRATIONAL(ret)->num;
     }
     return ret;
 }
@@ -3648,8 +3648,8 @@
     rb_copy_generic_ivar(str, time);
     if (!rb_equal(nano, INT2FIX(0))) {
         if (TYPE(nano) == T_RATIONAL) {
-            rb_ivar_set(str, id_nano_num, ((struct RRational *)nano)->num);
-            rb_ivar_set(str, id_nano_den, ((struct RRational *)nano)->den);
+            rb_ivar_set(str, id_nano_num, RRATIONAL(nano)->num);
+            rb_ivar_set(str, id_nano_den, RRATIONAL(nano)->den);
         }
         else {
             rb_ivar_set(str, id_nano_num, nano);
Index: version.h
===================================================================
--- version.h	(revision 26558)
+++ version.h	(revision 26559)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2010-02-03"
+#define RUBY_RELEASE_DATE "2010-02-04"
 #define RUBY_PATCHLEVEL -1
 #define RUBY_BRANCH_NAME "trunk"
 
@@ -8,7 +8,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2010
 #define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 3
+#define RUBY_RELEASE_DAY 4
 
 #include "ruby/version.h"
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]