summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-21 04:57:00 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-21 04:57:00 +0000
commitc2ace60b081c587532ba01ffebd6f4c1fe84e643 (patch)
tree7b147db2c14f411bb2c658af18349cd814453454
parent1684c86c33688517b7e2b2eabf932c3868730bac (diff)
Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog14
-rw-r--r--hash.c1
-rw-r--r--time.c4
-rw-r--r--version.h6
4 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c254414d2b..1fc6d18a87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Mon Apr 21 10:17:17 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * time.c: should include <errno.h> to refer errno.
+
+Mon Apr 21 10:02:43 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * hash.c (recursive_hash): prototype.
+
+Mon Apr 21 10:00:51 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * time.c (rb_strftime): check errno to detect strftime(3)'s error.
+ this is workaround for recent version of MSVCRT.
+ [ruby-dev:34456]
+
Sun Apr 20 21:02:06 2008 Akinori MUSHA <knu@iDaemons.org>
* enumerator.c: Resolve the method every time an enumeration
diff --git a/hash.c b/hash.c
index cb8e63a3e7..5a3d7ecfab 100644
--- a/hash.c
+++ b/hash.c
@@ -1607,6 +1607,7 @@ hash_i(key, val, hval)
return ST_CONTINUE;
}
+static VALUE recursive_hash _((VALUE, VALUE, int));
static VALUE
recursive_hash(hash, dummy, recur)
VALUE hash;
diff --git a/time.c b/time.c
index 00061f78ff..3792701b06 100644
--- a/time.c
+++ b/time.c
@@ -13,6 +13,7 @@
#include "ruby.h"
#include <sys/types.h>
#include <time.h>
+#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -1776,8 +1777,9 @@ rb_strftime(buf, format, time)
if (flen == 0) {
return 0;
}
+ errno = 0;
len = strftime(*buf, SMALLBUF, format, time);
- if (len != 0 || **buf == '\0') return len;
+ if (len != 0 || (**buf == '\0' && errno != ERANGE)) return len;
for (size=1024; ; size*=2) {
*buf = xmalloc(size);
(*buf)[0] = '\0';
diff --git a/version.h b/version.h
index 42557ac59f..c391a4506a 100644
--- a/version.h
+++ b/version.h
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2008-04-20"
+#define RUBY_RELEASE_DATE "2008-04-21"
#define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20080420
+#define RUBY_RELEASE_CODE 20080421
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 7
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 4
-#define RUBY_RELEASE_DAY 20
+#define RUBY_RELEASE_DAY 21
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];