From 8d8287365b8ab8541797ccb91866605357f278a2 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Sun, 12 Sep 2010 21:27:01 -0400 Subject: [PATCH] Added bonus question about the file read. --- src/about_iteration.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/about_iteration.rb b/src/about_iteration.rb index 8a738ab..08071ba 100644 --- a/src/about_iteration.rb +++ b/src/about_iteration.rb @@ -87,4 +87,17 @@ class AboutIteration < EdgeCase::Koan # map, select, etc. end + # Bonus Question: In the previous koan, we saw the construct: + # + # File.open(filename) do |file| + # # code to read 'file' + # end + # + # Why did we do it that way instead of the following? + # + # file = File.open(filename) + # # code to read 'file' + # + # When you get to the "AboutSandwichCode" koan, recheck your answer. + end