summaryrefslogtreecommitdiffhomepage
path: root/src/kernel.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-10-20 11:11:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-10-20 11:11:26 +0900
commit69ba4f0ed5e7ce179a01316dea753042dfcdfd77 (patch)
tree59a392075f89292b8a2d370953a6f662da4cda50 /src/kernel.c
parentcee3dc58d6993c80256b1d2aba5abf70de76499a (diff)
downloadmruby-69ba4f0ed5e7ce179a01316dea753042dfcdfd77.tar.gz
mruby-69ba4f0ed5e7ce179a01316dea753042dfcdfd77.zip
instance_methods etc should not include undef'ed method names; based on a patch from @cremno; fix #2613
Diffstat (limited to 'src/kernel.c')
-rw-r--r--src/kernel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel.c b/src/kernel.c
index 2f52c7bdf..22fe40218 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -614,7 +614,7 @@ method_entry_loop(mrb_state *mrb, struct RClass* klass, khash_t(st)* set)
khash_t(mt) *h = klass->mt;
if (!h) return;
for (i=0;i<kh_end(h);i++) {
- if (kh_exist(h, i)) {
+ if (kh_exist(h, i) && kh_value(h, i)) {
kh_put(st, mrb, set, kh_key(h, i));
}
}