From e66470a106108a591b52e708e95d36ab13e83b25 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 2 Oct 2009 15:31:05 +0000 Subject: [PATCH] * range.c (discrete_object_p): needs the argument type to get rid of truncation on platforms where VALUE is larger than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ range.c | 7 +++---- version.h | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9ec00964a..4c309cd799 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 3 00:31:04 2009 Nobuyoshi Nakada + + * 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 * enc/unicode/name2ctype.h.blt, enc/unicode/name2ctype.kwd, diff --git a/range.c b/range.c index ec10bdf907..60ad3939eb 100644 --- a/range.c +++ b/range.c @@ -309,11 +309,10 @@ step_i(VALUE i, void *arg) 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); } diff --git a/version.h b/version.h index 79b2368688..3e86511213 100644 --- a/version.h +++ b/version.h @@ -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"