diff options
| -rw-r--r-- | spec/practice/luhn_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/practice/luhn_spec.rb b/spec/practice/luhn_spec.rb index 964888b..6303319 100644 --- a/spec/practice/luhn_spec.rb +++ b/spec/practice/luhn_spec.rb @@ -31,7 +31,7 @@ class Luhn def self.partition(digits) digits.each_with_index.inject([[], []]) do |memo, (digit, index)| - index.even? ? memo[0].push(digit) : memo[1].push(digit) + memo[index.even? ? 0 : 1].push(digit) memo end end |
