Skip to content

Commit 14fe663

Browse files
author
izumin5210
committed
Fix idiom title
1 parent 5cc5ae4 commit 14fe663

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ Enumerable#sort_by (Symbol#to_proc): 25916.1 i/s
411411

412412
### Hash
413413

414-
##### `Hash#[]` vs `Hash.fetch` [code](code/hash/bracket-vs-fetch.rb)
414+
##### `Hash#[]` vs `Hash#fetch` [code](code/hash/bracket-vs-fetch.rb)
415415

416416
If you use Ruby 2.2, `Symbol` could be more performant than `String` as `Hash` keys.
417417
Read more regarding this: [Symbol GC in Ruby 2.2](http://www.sitepoint.com/symbol-gc-ruby-2-2/) and [Unraveling String Key Performance in Ruby 2.2](http://www.sitepoint.com/unraveling-string-key-performance-ruby-2-2/).
@@ -438,7 +438,7 @@ Comparison:
438438
Hash#fetch, string: 3981166.5 i/s - 1.89x slower
439439
```
440440

441-
##### `Hash#[]` vs `Hash#dup` [code](code/hash/bracket-vs-dup.rb)
441+
##### `Hash[]` vs `Hash#dup` [code](code/hash/bracket-vs-dup.rb)
442442

443443
Source: http://tenderlovemaking.com/2015/02/11/weird-stuff-with-hashes.html
444444

0 commit comments

Comments
 (0)