Skip to content

Commit

Permalink
[Truffle] Add modules to Kernel#instance_of?
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Fish committed Sep 4, 2016
1 parent 294d80f commit 2271012
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/kernel/instance_of_tags.txt

This file was deleted.

Expand Up @@ -969,7 +969,7 @@ public InstanceOfNode(RubyContext context, SourceSection sourceSection) {
classNode = LogicalClassNodeGen.create(context, sourceSection, null);
}

@Specialization(guards = "isRubyClass(rubyClass)")
@Specialization(guards = "isRubyClass(rubyClass) || isRubyModule(rubyClass)")

This comment has been minimized.

Copy link
@eregon

eregon Sep 6, 2016

Member

Since Module < Class, only the second guard is necessary

This comment has been minimized.

Copy link
@bjfish

bjfish Sep 7, 2016

Contributor

@eregon I've fixed this at 640732c, thanks

public boolean instanceOf(VirtualFrame frame, Object self, DynamicObject rubyClass) {
return classNode.executeLogicalClass(self) == rubyClass;
}
Expand Down

0 comments on commit 2271012

Please sign in to comment.