#!/usr/bin/ruby def test puts "You are in the method" yield puts "You are again back to the method" yield end test {puts "You are in the block"}
#!/usr/bin/ruby
def test yield 5 puts "You are in the method test" yield 100 end test {|i| puts "You are in the block #{i}"}
def one_two_three yield 1 yield 2 yield 3 end one_two_three { |number| puts number * 10 }