lib/multi_range.rb in multi_range-1.3.1 vs lib/multi_range.rb in multi_range-1.3.2

- old
+ new

@@ -20,10 +20,10 @@ INDEX_WITH_DEFAULT = Object.new attr_reader :ranges def initialize(ranges) - @ranges = ranges.map{|s| s.is_a?(Numeric) ? s..s : s }.sort_by(&:begin).freeze + @ranges = ranges.map{|s| s.is_a?(Numeric) ? s..s : s }.sort_by{|s| s.begin }.freeze @is_float = @ranges.any?{|range| range.begin.is_a?(Float) || range.end.is_a?(Float) } end def merge_overlaps(merge_same_value = true) return MultiRange.new([]) if @ranges.size == 0