eql?

rng.eql?(obj) â true or false
Instance Public methods

Returns true only if obj is a Range, has equivalent begin and end items (by comparing them with eql?), and has the same exclude_end? setting as the range.

(0..2).eql?(0..2)            #=> true
(0..2).eql?(Range.new(0,2))  #=> true
(0..2).eql?(0...2)           #=> false
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.