1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_undef): undef should be done for klass, not ruby_class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2002-07-31 05:18:43 +00:00
parent 2a31a00fd9
commit 2b98e10419
4 changed files with 12 additions and 7 deletions

View file

@ -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

4
eval.c
View file

@ -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;

7
time.c
View file

@ -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])) {

View file

@ -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