From: Esh Gun Date: 2013-05-13T23:37:13+09:00 Subject: Re: Basic question about blocks Joel Pearson wrote in post #1108788: > The order of execution is correct, you're calling "animals" twice, and > in each case you're getting "Tiger" and "Giraffe" before moving on the > next call of "animals". Sorry but I am trying to understand the flow here... 1) First yield "Tiger" should call animals { |x| puts "Hello, #{x}" } animals { |x| puts "It's #{x.length} characters long!" } 2) Second yield "Giraffe" should call animals { |x| puts "Hello, #{x}" } animals { |x| puts "It's #{x.length} characters long!" } But the output is NOT... Hello, Tiger It's 5 characters long! Hello, Giraffe It's 7 characters long! The output IS... Hello, Tiger Hello, Giraffe It's 5 characters long! It's 7 characters long! -- Posted via http://www.ruby-forum.com/.