Skip to content

Commit 206152a

Browse files
committed
[Truffle] Implemented TrueClass#hash and FalseClass#hash.
1 parent ac9c832 commit 206152a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,11 @@ public int hash(double value) {
935935
return Double.valueOf(value).hashCode();
936936
}
937937

938+
@Specialization
939+
public int hash(boolean value) {
940+
return Boolean.valueOf(value).hashCode();
941+
}
942+
938943
@Specialization
939944
public int hash(RubyBasicObject self) {
940945
return self.hashCode();

0 commit comments

Comments
 (0)