Skip to content

Commit

Permalink
[Truffle] Completed the False#^ implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Nov 19, 2014
1 parent a7a7d7f commit a72cc46
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Expand Up @@ -33,6 +33,20 @@ public boolean xor(boolean other) {
return false ^ other;
}

@Specialization
public boolean xor(RubyNilClass other) {
return false;
}

@Specialization(guards = "isNotNull")
public boolean xor(RubyObject other) {
return true;
}

static boolean isNotNull(RubyObject o) {
return ! (o instanceof RubyNilClass);
}

}

@CoreMethod(names = {"to_s", "inspect"}, needsSelf = false)
Expand Down
1 change: 0 additions & 1 deletion spec/truffle/tags/core/false/xor_tags.txt

This file was deleted.

0 comments on commit a72cc46

Please sign in to comment.