From: "Jesús Gabriel y Galán" Date: 2009-01-15T01:37:01+09:00 Subject: Re: a beginner case question On Wed, Jan 14, 2009 at 5:26 PM, Taylor Strait wrote: > Thanks Brian and Jesus - I didn't know you could .reverse a code block. > I had tried that with parenthesis but not just on the block itself. Well, you are not reversing the code block, you are reversing the result of the call to sort_by, which is an array. The line is functionally identical to: (answers.sort_by {|answer| answer.text}).reverse The sort_by method receives no params and a block, and returns an array. You are then calling reverse on the resulting array. It's more clear in Brian's explanation, where he used a temporary variable to store the result of the sort_by call. Hope this clarifies, Jesus.