Sha256: 060e63b0d63e1d37c6072f49f37b92c8e3fabe9264eec61b25628a7076766aec

Contents?: true

Size: 270 Bytes

Versions: 23

Compression:

Stored size: 270 Bytes

Contents

[1,2,3].include? 2

numbers = [1,2,3]

numbers.include? 2

def fast
  (BEGIN_OF_JULY..END_OF_JULY).cover? DAY_IN_JULY
end

def slow
  (BEGIN_OF_JULY..END_OF_JULY).include? DAY_IN_JULY
end

(10..1_000_000).include? 999

(BEGIN_OF_JULY...END_OF_JULY).include? DAY_IN_JULY

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fasterer-0.2.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.1.12 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.1.11 spec/support/analyzer/29_include_vs_cover_on_range.rb