@patio11 See also:
> h = Hash.new("default"); h[:bar]
=> "default"
-
New conversation
-
-
-
@patio11 for added fun: f = ->(h,k) { h[k] = Hash.new(&f) } Hash.new(&f)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 I use this all the time for counters. Never need to check nil, just +1.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.