Created
February 10, 2015 02:08
-
-
Save anonymous/73a619be826ecbc6b9c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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