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

  • The Ugly Stepsister (2025)
    * * *

    Ug, but funny. Epecially wit te wrong foot.

  • Excuse Me, I'm Looking for the Ping-pong Room and My Girlfriend (Short 2018)
    * *

    Oeyish.

  • Together (2025)
    * * *

    inda me inda o.

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