From e47de1c8471758ffa001d7ada056d747efb0c4ac Mon Sep 17 00:00:00 2001 From: Kim Joar Bekkelund Date: Sun, 23 Oct 2011 01:49:52 +0200 Subject: [PATCH] Using times instead of each when implementing Fibonnaci --- lib/extreme_startup/question_factory.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extreme_startup/question_factory.rb b/lib/extreme_startup/question_factory.rb index ac260b8..fa4c3be 100644 --- a/lib/extreme_startup/question_factory.rb +++ b/lib/extreme_startup/question_factory.rb @@ -277,7 +277,7 @@ def points def correct_answer n = @n1 + 4 a, b = 0, 1 - (0...n).each { |_| a, b = b, a + b } + n.times { a, b = b, a + b } a end end