Skip to content

Instantly share code, notes, and snippets.

@ohammersmith
Created April 27, 2009 15:56
Show Gist options
  • Select an option

  • Save ohammersmith/102566 to your computer and use it in GitHub Desktop.

Select an option

Save ohammersmith/102566 to your computer and use it in GitHub Desktop.
irb(main):001:0> h = {:foo => "bar", :bar => "foo"}
=> {:bar=>"foo", :foo=>"bar"}
irb(main):002:0> h
=> {:bar=>"foo", :foo=>"bar"}
irb(main):003:0> h.respond_to?(:all?)
=> true
irb(main):004:0> h.all? { |k, v| puts k }
bar
=> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment