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.11.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.10.1 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.10.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.9.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.8.3 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.8.2 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.8.1 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.8.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.7.1 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.7.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.6.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.5.1 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.5.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.4.2 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.4.1 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.4.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.3.2 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.3.1 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.3.0 spec/support/analyzer/29_include_vs_cover_on_range.rb
fasterer-0.2.1 spec/support/analyzer/29_include_vs_cover_on_range.rb