Skip to content

Commit

Permalink
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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)
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.