Skip to content

Instantly share code, notes, and snippets.

@nickyp
Created March 19, 2012 13:41

Revisions

  1. nickyp created this gist Mar 19, 2012.
    10 changes: 10 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    foo = {:foo => "bar", :olaf => "polaf"}
    bar = 2

    def olaf(one, two = one[:foo])
    puts "#{one} - #{two}\n"
    end

    olaf(foo)

    olaf(foo, bar)