Skip to content
Permalink
Browse files
[Truffle] Completed the False#^ implementation.
  • 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.
@@ -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)

This file was deleted.

0 comments on commit a72cc46

Please sign in to comment.