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

merge revision(s) 13586:

* eval.c (remove_method): should not remove undef place holder.
	  [ruby-dev:31817]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2008-06-04 10:17:30 +00:00
parent 18bdc0234c
commit 1ecb29fbf8
3 changed files with 13 additions and 3 deletions

View file

@ -14,6 +14,11 @@ Tue Jun 3 15:45:00 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (os_obj_of, os_each_obj): hide objects to be finalized.
[ruby-dev:31810]
Wed Jun 4 19:16:40 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (remove_method): should not remove undef place holder.
[ruby-dev:31817]
Tue Jun 3 15:22:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* process.c (struct rb_exec_arg): proc should be a VALUE.

9
eval.c
View file

@ -569,8 +569,13 @@ remove_method(klass, mid)
if (mid == __id__ || mid == __send__ || mid == init) {
rb_warn("removing `%s' may cause serious problem", rb_id2name(mid));
}
if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
!body->nd_body) {
if (st_lookup(RCLASS(klass)->m_tbl, mid, (st_data_t *)&body)) {
if (!body || !body->nd_body) body = 0;
else {
st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body);
}
}
if (!body) {
rb_name_error(mid, "method `%s' not defined in %s",
rb_id2name(mid), rb_class2name(klass));
}

View file

@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-04"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080604
#define RUBY_PATCHLEVEL 124
#define RUBY_PATCHLEVEL 125
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8