mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-15 07:23:19 -04:00
corrected example code in test_each_can_use_curly_brace_blocks_too
test_each_can_use_curly_brace_blocks_too was using the do-end block instead of the curly brace syntax for the each method.
This commit is contained in:
@@ -39,9 +39,7 @@ class AboutIteration < Neo::Koan
|
|||||||
def test_each_can_use_curly_brace_blocks_too
|
def test_each_can_use_curly_brace_blocks_too
|
||||||
array = [1, 2, 3]
|
array = [1, 2, 3]
|
||||||
sum = 0
|
sum = 0
|
||||||
array.each do |item|
|
array.each { |item| sum += item }
|
||||||
sum += item
|
|
||||||
end
|
|
||||||
assert_equal __(6), sum
|
assert_equal __(6), sum
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user