Skip to content

Instantly share code, notes, and snippets.

@BrianJoyce
Created October 2, 2012 17:56
Show Gist options
  • Save BrianJoyce/3821718 to your computer and use it in GitHub Desktop.
Save BrianJoyce/3821718 to your computer and use it in GitHub Desktop.
debugging_argument_1
def mean(*numbers)
sum = numbers.inject(:+)
return sum / numbers.length
end
# This will throw an error. Change this line so that it works.
sample_avg = mean(5, 3, 6, 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment