# your code goes here def thing(&blk) my_hash = {a: 1, b: 2} my_hash.each(&blk)end thing do |a,b| puts "Key: #{a}, Value: #{b}" end
Standard input is empty
Key: a, Value: 1 Key: b, Value: 2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!