diff options
| author | Blaž Hrastnik <[email protected]> | 2015-07-13 23:35:30 +0200 |
|---|---|---|
| committer | Blaž Hrastnik <[email protected]> | 2015-07-13 23:35:30 +0200 |
| commit | 8c13e2b7c6e6c1c02771e4f9e5aebda109892503 (patch) | |
| tree | 62bd88ba7224f616a325f8dd64bf6c287e815acf /src/object.c | |
| parent | b0fb9ccfd8cb5986ea153142687cfbed1a876d6b (diff) | |
| download | mruby-8c13e2b7c6e6c1c02771e4f9e5aebda109892503.tar.gz mruby-8c13e2b7c6e6c1c02771e4f9e5aebda109892503.zip | |
Set origin when doing kind_of? comparisons
Diffstat (limited to 'src/object.c')
| -rw-r--r-- | src/object.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c index f8f41bfe8..c834ee04f 100644 --- a/src/object.c +++ b/src/object.c @@ -487,6 +487,7 @@ mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c) mrb_raise(mrb, E_TYPE_ERROR, "class or module required"); } + c = c->origin; while (cl) { if (cl == c || cl->mt == c->mt) return TRUE; |
