summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--intern.h1
-rw-r--r--object.c13
-rw-r--r--version.h6
4 files changed, 21 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9506bc14e0..3b296923ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Apr 5 10:05:00 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_check_to_integer): backported for range_step.
+
Fri Apr 4 05:57:11 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/net/pop.rb (Net::POP3::do_finish): clear @n_mails and
diff --git a/intern.h b/intern.h
index acdf488fd4..29d7189aa6 100644
--- a/intern.h
+++ b/intern.h
@@ -319,6 +319,7 @@ VALUE rb_class_real _((VALUE));
VALUE rb_class_inherited_p _((VALUE, VALUE));
VALUE rb_convert_type _((VALUE,int,const char*,const char*));
VALUE rb_check_convert_type _((VALUE,int,const char*,const char*));
+VALUE rb_check_to_integer _((VALUE, const char *));
VALUE rb_to_int _((VALUE));
VALUE rb_Integer _((VALUE));
VALUE rb_Float _((VALUE));
diff --git a/object.c b/object.c
index 5b2a255d0c..3e2fb58ab4 100644
--- a/object.c
+++ b/object.c
@@ -2200,6 +2200,19 @@ rb_to_integer(val, method)
}
VALUE
+rb_check_to_integer(VALUE val, const char *method)
+{
+ VALUE v;
+
+ if (FIXNUM_P(val)) return val;
+ v = convert_type(val, "Integer", method, Qfalse);
+ if (!rb_obj_is_kind_of(v, rb_cInteger)) {
+ return Qnil;
+ }
+ return v;
+}
+
+VALUE
rb_to_int(val)
VALUE val;
{
diff --git a/version.h b/version.h
index b5036234c4..ea65caf72a 100644
--- a/version.h
+++ b/version.h
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2008-04-03"
+#define RUBY_RELEASE_DATE "2008-04-05"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20080403
+#define RUBY_RELEASE_CODE 20080405
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 4
-#define RUBY_RELEASE_DAY 3
+#define RUBY_RELEASE_DAY 5
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];