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