mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_insnhelper.c (vm_method_search): fix control flow bug.
(commited at r20981) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c4b30b4449
commit
1f2d804e5e
2 changed files with 11 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Dec 25 14:32:23 2008 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_insnhelper.c (vm_method_search): fix control flow bug.
|
||||
(commited at r20981)
|
||||
|
||||
Thu Dec 25 13:28:20 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_flush): fsync() after buffer is flushed on win32.
|
||||
|
|
|
@ -1172,24 +1172,22 @@ vm_method_search(VALUE id, VALUE klass, IC ic)
|
|||
static inline VALUE
|
||||
vm_search_normal_superclass(VALUE klass, VALUE recv)
|
||||
{
|
||||
VALUE sk = 0;
|
||||
|
||||
if (BUILTIN_TYPE(klass) == T_CLASS) {
|
||||
sk = RCLASS_SUPER(klass);
|
||||
return RCLASS_SUPER(klass);
|
||||
}
|
||||
else if (BUILTIN_TYPE(klass) == T_MODULE) {
|
||||
VALUE k = CLASS_OF(recv);
|
||||
while (k) {
|
||||
if (BUILTIN_TYPE(k) == T_ICLASS && RBASIC(k)->klass == klass) {
|
||||
sk = RCLASS_SUPER(k);
|
||||
break;
|
||||
return RCLASS_SUPER(k);
|
||||
}
|
||||
k = RCLASS_SUPER(k);
|
||||
}
|
||||
sk = rb_cObject;
|
||||
return rb_cObject;
|
||||
}
|
||||
else {
|
||||
rb_bug("vm_search_normal_superclass: should not be reach here");
|
||||
}
|
||||
|
||||
return sk;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue