Skip to content

Commit

Permalink
Fix to return correct answer
Browse files Browse the repository at this point in the history
The answer should be array but previous answer was integer.
  • Loading branch information
taiki45 committed May 2, 2012
1 parent f400183 commit cb88ec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruby/array_joins.rb
Expand Up @@ -5,7 +5,7 @@
nums = [2,7,8,9]

def return_incremented(nums)
nums.join.to_i + 1
(nums.join.to_i + 1).to_s.each_char.map {|c| c.to_i }
end

puts return_incremented nums
p return_incremented nums

0 comments on commit cb88ec3

Please sign in to comment.