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

ruby-changes:19103

From: naruse <ko1@a...>
Date: Tue, 22 Mar 2011 09:23:49 +0900 (JST)
Subject: [ruby-changes:19103] Ruby:r31142 (trunk): * lib/test/unit/parallel.rb: remove unused variable.

naruse	2011-03-22 06:42:23 +0900 (Tue, 22 Mar 2011)

  New Revision: 31142

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

  Log:
    * lib/test/unit/parallel.rb: remove unused variable.

  Modified files:
    trunk/ChangeLog
    trunk/ext/date/date_core.c
    trunk/lib/test/unit/parallel.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31141)
+++ ChangeLog	(revision 31142)
@@ -1,3 +1,7 @@
+Tue Mar 22 06:41:37 2011  NARUSE, Yui  <naruse@r...>
+
+	* lib/test/unit/parallel.rb: remove unused variable.
+
 Tue Mar 22 06:19:42 2011  NARUSE, Yui  <naruse@r...>
 
 	* enc/utf_16le.c: surpress warning: shorten-64-to-32.
@@ -8,7 +12,6 @@
 
 	* parse.y (Init_ripper): surpress warning: unused value.
 
-
 Mon Mar 21 11:21:32 2011  Shota Fukumori  <sorah@t...>
 
 	* lib/test/unit.rb: Refactoring. Unified if and elsif.
Index: lib/test/unit/parallel.rb
===================================================================
--- lib/test/unit/parallel.rb	(revision 31141)
+++ lib/test/unit/parallel.rb	(revision 31142)
@@ -20,7 +20,7 @@
 
       def _run_suites(suites, type)
         suites.map do |suite|
-          result = _run_suite(suite, type)
+          _run_suite(suite, type)
         end
       end
 
Index: ext/date/date_core.c
===================================================================
--- ext/date/date_core.c	(revision 31141)
+++ ext/date/date_core.c	(revision 31142)
@@ -42,10 +42,10 @@
 #define DAY_IN_NANOSECONDS 86400000000000LL
 
 /* copied from time.c */
-#define NDIV(x,y) (-(-((x)+1)/(y))-1)
-#define NMOD(x,y) ((y)-(-((x)+1)%(y))-1)
-#define DIV(n,d) ((n)<0 ? NDIV((n),(d)) : (n)/(d))
-#define MOD(n,d) ((n)<0 ? NMOD((n),(d)) : (n)%(d))
+#define NDIV(x,y) ((int)(-(-((x)+1)/(y))-1))
+#define NMOD(x,y) ((int)((y)-(-((x)+1)%(y))-1))
+#define DIV(n,d) ((int)((n)<0 ? NDIV((n),(d)) : (n)/(d)))
+#define MOD(n,d) ((int)((n)<0 ? NMOD((n),(d)) : (n)%(d)))
 
 union DateData
 {
@@ -305,7 +305,7 @@
 
     jd_to_civil(jd, sg, ry, &rm2, &rd2);
     find_fdoy(*ry, sg, &rjd, &ns);
-    *rd = jd - rjd + 1;
+    *rd = (int)(jd - rjd) + 1;
 }
 
 static void
@@ -820,11 +820,11 @@
     switch (argc) {
       case 4:
       case 3:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 2:
-	m = NUM2LONG(vm);
+	m = NUM2INT(vm);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_YEAR(y))
 	    return cforwardv("valid_civil_r?");
     }
@@ -868,9 +868,9 @@
     switch (argc) {
       case 3:
       case 2:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_YEAR(y))
 	    return cforwardv("valid_ordinal_r?");
     }
@@ -911,11 +911,11 @@
     switch (argc) {
       case 4:
       case 3:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 2:
-	w = NUM2LONG(vw);
+	w = NUM2INT(vw);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_CWYEAR(y))
 	    return cforwardv("valid_commercial_r?");
     }
@@ -1128,9 +1128,9 @@
     switch (argc) {
       case 3:
       case 2:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_YEAR(y))
 	    return cforwardv("ordinal_r");
     }
@@ -1195,11 +1195,11 @@
     switch (argc) {
       case 4:
       case 3:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 2:
-	m = NUM2LONG(vm);
+	m = NUM2INT(vm);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_YEAR(y))
 	    return cforwardv("civil_r");
     }
@@ -1271,11 +1271,11 @@
     switch (argc) {
       case 4:
       case 3:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 2:
-	w = NUM2LONG(vw);
+	w = NUM2INT(vw);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_CWYEAR(y))
 	    return cforwardv("commercial_r");
     }
@@ -2697,11 +2697,11 @@
 	if (!daydiff_to_sec(vof, &rof))
 	    return cforwardv("jd_r");
       case 4:
-	s = NUM2LONG(vs);
+	s = NUM2INT(vs);
       case 3:
-	min = NUM2LONG(vmin);
+	min = NUM2INT(vmin);
       case 2:
-	h = NUM2LONG(vh);
+	h = NUM2INT(vh);
       case 1:
 	jd = NUM2LONG(vjd);
 	if (!LIGHTABLE_JD(jd))
@@ -2774,15 +2774,15 @@
 	if (!daydiff_to_sec(vof, &rof))
 	    return cforwardv("ordinal_r");
       case 5:
-	s = NUM2LONG(vs);
+	s = NUM2INT(vs);
       case 4:
-	min = NUM2LONG(vmin);
+	min = NUM2INT(vmin);
       case 3:
-	h = NUM2LONG(vh);
+	h = NUM2INT(vh);
       case 2:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_YEAR(y))
 	    return cforwardv("ordinal_r");
     }
@@ -2864,17 +2864,17 @@
 	if (!daydiff_to_sec(vof, &rof))
 	    return cforwardv("civil_r");
       case 6:
-	s = NUM2LONG(vs);
+	s = NUM2INT(vs);
       case 5:
-	min = NUM2LONG(vmin);
+	min = NUM2INT(vmin);
       case 4:
-	h = NUM2LONG(vh);
+	h = NUM2INT(vh);
       case 3:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 2:
-	m = NUM2LONG(vm);
+	m = NUM2INT(vm);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_YEAR(y))
 	    return cforwardv("civil_r");
     }
@@ -2967,17 +2967,17 @@
 	if (!daydiff_to_sec(vof, &rof))
 	    return cforwardv("commercial_r");
       case 6:
-	s = NUM2LONG(vs);
+	s = NUM2INT(vs);
       case 5:
-	min = NUM2LONG(vmin);
+	min = NUM2INT(vmin);
       case 4:
-	h = NUM2LONG(vh);
+	h = NUM2INT(vh);
       case 3:
-	d = NUM2LONG(vd);
+	d = NUM2INT(vd);
       case 2:
-	w = NUM2LONG(vw);
+	w = NUM2INT(vw);
       case 1:
-	y = NUM2LONG(vy);
+	y = NUM2INT(vy);
 	if (!LIGHTABLE_CWYEAR(y))
 	    return cforwardv("commercial_r");
     }
@@ -3054,7 +3054,7 @@
     if (s == 60)
 	s = 59;
 #ifdef HAVE_STRUCT_TM_TM_GMTOFF
-    of = tm.tm_gmtoff;
+    of = (int)tm.tm_gmtoff;
 #else
     of = (int)-timezone;
 #endif

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

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