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

ruby-changes:13420

From: nobu <ko1@a...>
Date: Sat, 3 Oct 2009 00:31:25 +0900 (JST)
Subject: [ruby-changes:13420] Ruby:r25191 (trunk): * range.c (discrete_object_p): needs the argument type to get rid

nobu	2009-10-03 00:31:05 +0900 (Sat, 03 Oct 2009)

  New Revision: 25191

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

  Log:
    * range.c (discrete_object_p): needs the argument type to get rid
      of truncation on platforms where VALUE is larger than int.

  Modified files:
    trunk/ChangeLog
    trunk/range.c
    trunk/version.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25190)
+++ ChangeLog	(revision 25191)
@@ -1,3 +1,8 @@
+Sat Oct  3 00:31:04 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* range.c (discrete_object_p): needs the argument type to get rid
+	  of truncation on platforms where VALUE is larger than int.
+
 Fri Oct  2 22:30:15 2009  NARUSE, Yui  <naruse@r...>
 
 	* enc/unicode/name2ctype.h.blt, enc/unicode/name2ctype.kwd,
Index: range.c
===================================================================
--- range.c	(revision 25190)
+++ range.c	(revision 25191)
@@ -309,11 +309,10 @@
 extern int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl);
 
 static int
-discrete_object_p(obj)
+discrete_object_p(VALUE obj)
 {
-    if (rb_obj_is_kind_of(obj, rb_cTime)) return Qfalse; /* until Time#succ removed */
-    if (rb_respond_to(obj, id_succ)) return Qtrue;
-    return Qfalse;
+    if (rb_obj_is_kind_of(obj, rb_cTime)) return FALSE; /* until Time#succ removed */
+    return rb_respond_to(obj, id_succ);
 }
 
 
Index: version.h
===================================================================
--- version.h	(revision 25190)
+++ version.h	(revision 25191)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2009-10-02"
+#define RUBY_RELEASE_DATE "2009-10-03"
 #define RUBY_PATCHLEVEL -1
 #define RUBY_BRANCH_NAME "trunk"
 
@@ -8,7 +8,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2009
 #define RUBY_RELEASE_MONTH 10
-#define RUBY_RELEASE_DAY 2
+#define RUBY_RELEASE_DAY 3
 
 #include "ruby/version.h"
 

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

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