Skip to content

Commit

Permalink
A class should be a kind_of its singleton_class (fixes #438)
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Nov 15, 2013
1 parent 1be7e68 commit 5ba458f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opal/core/runtime.js
Expand Up @@ -603,6 +603,10 @@
};

Opal.is_a = function(object, klass) {
if (object.__meta__ === klass) {
return true;
}

var search = object._klass;

while (search) {
Expand Down

0 comments on commit 5ba458f

Please sign in to comment.