git://git.eng.unimelb.edu.au
/
ruby_koans.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c18e97
)
Added bonus question about the file read.
author
Jim Weirich
<jim.weirich@gmail.com>
Mon, 13 Sep 2010 01:27:01 +0000
(21:27 -0400)
committer
Jim Weirich
<jim.weirich@gmail.com>
Mon, 13 Sep 2010 01:27:01 +0000
(21:27 -0400)
src/about_iteration.rb
patch
|
blob
|
history
diff --git
a/src/about_iteration.rb
b/src/about_iteration.rb
index
8a738ab
..
08071ba
100644
(file)
--- 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