Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Lillian Zhang committed Jan 11, 2021
1 parent c310ecb commit faaeba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/ruby/truffleruby/core/truffle/range_operations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ def self.range_cover?(range, other)
return false if Primitive.nil?(b2) && !Primitive.nil?(b1)
return false if Primitive.nil?(e2) && !Primitive.nil?(e1)

return false unless (Primitive.nil?(b2) || cover?(range, b2))
return false unless (Primitive.nil?(b2) || cover?(range, b2))

return true if Primitive.nil?(e2)

if e1 == e2
!(range.exclude_end? && !other.exclude_end?)
else
if Integer === e2 && other.exclude_end?
cover?(range, e2 -1)
cover?(range, e2 - 1)
else
cover?(range, e2)
end
Expand Down

0 comments on commit faaeba6

Please sign in to comment.