Skip to content

Instantly share code, notes, and snippets.

Created February 10, 2015 02:08
Show Gist options
  • Save anonymous/73a619be826ecbc6b9c5 to your computer and use it in GitHub Desktop.
Save anonymous/73a619be826ecbc6b9c5 to your computer and use it in GitHub Desktop.
File.open('homeworkdata.txt', 'r') do |f|
while line = f.gets
lines = line.gsub(/,/, ' ')
grades = Grade.new(*lines)
grade_arr << grades
end
end
***********************************************
File.open('homeworkdata.txt', 'r') do |f|
while line = f.gets
lines = [line.gsub(/,/, ' ')]
grades = Grade.new(*lines)
grade_arr << grades
end
end
grade.rb:8:in `initialize': wrong number of arguments (1 for 2) (ArgumentError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment