Skip to content

Commit

Permalink
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/range/eql_tags.txt

This file was deleted.

9 changes: 8 additions & 1 deletion truffle/src/main/ruby/core/range.rb
Original file line number Diff line number Diff line change
@@ -53,7 +53,14 @@ def ==(other)
self.exclude_end? == other.exclude_end?
end

alias_method :eql?, :==
def eql?(other)
return true if equal? other

other.kind_of?(Range) and
self.first.eql?(other.first) and
self.last.eql?(other.last) and
self.exclude_end? == other.exclude_end?
end

attr_reader_specific :excl, :exclude_end?

0 comments on commit 4de78c8

Please sign in to comment.