Sha256: 4dc981dbce35e94578e070c8b18abc6d28d102bb00d37694f0b593b7622e6732

Contents?: true

Size: 155 Bytes

Versions: 34

Compression:

Stored size: 155 Bytes

Contents

HASH = { :writing => :fast_ruby }

def slow
  HASH.fetch(:writing, [*1..100])
end

def fast
  HASH.fetch(:writing) { [*1..100] }
end

HASH.fetch(:writing)

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
fasterer-0.2.0 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.12 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.11 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.10 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.9 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.8 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.7 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.6 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.5 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.4 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.3 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.2 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.1 spec/support/analyzer/14_fetch_with_argument_vs_block.rb
fasterer-0.1.0 spec/support/analyzer/14_fetch_with_argument_vs_block.rb