Skip to content

Commit 5a015e2

Browse files
committed
[GR-17457] Add === method alias for nil, true, false
PullRequest: truffleruby/2435
2 parents 3b05154 + 4af9a86 commit 5a015e2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

spec/tags/truffle/methods_tags.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ fails:Public methods on Digest.singleton_class should include const_missing
3434
fails:Public methods on Digest::Instance should not include finish
3535
fails:Public methods on Dir should not include closed?
3636
fails:Public methods on Exception should include respond_to?
37-
fails:Public methods on FalseClass should include ===
38-
fails:Public methods on TrueClass should include ===
39-
fails:Public methods on NilClass should include ===
4037
fails:Public methods on Fiber should not include alive?
4138
fails:Public methods on Fiber should not include transfer
4239
fails:Public methods on Fiber should include inspect
@@ -64,4 +61,3 @@ fails:Public methods on Enumerator::Lazy should include filter_map
6461
fails:Public methods on Enumerator::Lazy should include with_index
6562
fails:Public methods on Fiber should include raise
6663
fails:Public methods on IO should include set_encoding_by_bom
67-
fails:Public methods on Module should include const_source_location

src/main/ruby/truffleruby/core/false.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def inspect
3838
to_s
3939
end
4040

41+
alias_method :===, :===
4142
end
4243

4344
FALSE = false

src/main/ruby/truffleruby/core/nil.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def to_c
7676
def to_h
7777
{}
7878
end
79+
80+
alias_method :===, :===
7981
end
8082

8183
NIL = nil

src/main/ruby/truffleruby/core/true.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def inspect
3838
to_s
3939
end
4040

41+
alias_method :===, :===
4142
end
4243

4344
TRUE = true

0 commit comments

Comments
 (0)