Skip to content
Paweł Gościcki

Paweł Gościcki

Random pieces of code, thoughts and movie reviews

Pages

  • Movie reviews
  • Projects
    • WP Movie Ratings

Recent movies

  • Berlin Station S03 (TV Series 2019)
    * * * *

    Pretty good, pretty good.

  • Berlin Station S02 (TV Series 2017)
    * * * *

    Decent, although similarly as with the first season, the ending left something to be desired. A bitter taste of unfinished plots. An abrupt ending.

  • Berlin Station S01 (TV Series 2016)
    * * * * +

    Pretty great if you ask me. Pretty great.

All movie ratings »

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Hash#fetch

{}.fetch(:a) { 0 }
=> 0

I think it’s really beautiful. Oh, and it’s Ruby, btw.

Update: this is even better:

{}.fetch(:a) { {} }
=> {}

Published by

Paweł Gościcki

Ruby/Rails programmer. View all posts by Paweł Gościcki

Posted on August 30, 2011June 19, 2022Author Paweł GościckiCategories programming, ruby

Post navigation

Previous Previous post: hookup is the shit!
Next Next post: My first pull request to a public project has been accepted
Proudly powered by WordPress