summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--eval.c4
-rw-r--r--time.c7
-rw-r--r--version.h4
4 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 26b72b3..c07eea1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul 31 14:11:43 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (rb_undef): undef should be done for klass, not ruby_class.
+
Tue Jul 30 19:48:51 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* misc/ruby-mode.el (ruby-accurate-end-of-block): restrict search
diff --git a/eval.c b/eval.c
index 8b1ca4d..dea7189 100644
--- a/eval.c
+++ b/eval.c
@@ -1617,7 +1617,7 @@ rb_undef(klass, id)
VALUE origin;
NODE *body;
- if (ruby_class == rb_cObject) {
+ if (ruby_class == rb_cObject && klass == ruby_class) {
rb_secure(4);
}
if (ruby_safe_level >= 4 && !OBJ_TAINTED(klass)) {
@@ -1630,7 +1630,7 @@ rb_undef(klass, id)
if (id == __id__ || id == __send__ || id == init) {
rb_warn("undefining `%s' may cause serious problem", rb_id2name(id));
}
- body = search_method(ruby_class, id, &origin);
+ body = search_method(klass, id, &origin);
if (!body || !body->nd_body) {
char *s0 = " class";
VALUE c = klass;
diff --git a/time.c b/time.c
index 3d16676..fe22303 100644
--- a/time.c
+++ b/time.c
@@ -261,15 +261,16 @@ time_arg(argc, argv, tm, usec)
year = obj2long(v[0]);
if (0 <= year && year < 39) {
- year += 2000;
+ year += 100;
rb_warning("2 digits year is used");
}
else if (69 <= year && year < 139) {
- year += 1900;
rb_warning("2 or 3 digits year is used");
}
+ else {
+ year -= 1900;
+ }
- year -= 1900;
tm->tm_year = year;
if (NIL_P(v[1])) {
diff --git a/version.h b/version.h
index 8d27d75..46c93e7 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.2"
-#define RUBY_RELEASE_DATE "2002-07-30"
+#define RUBY_RELEASE_DATE "2002-07-31"
#define RUBY_VERSION_CODE 172
-#define RUBY_RELEASE_CODE 20020730
+#define RUBY_RELEASE_CODE 20020731