Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAvery Greenlees
4,615 PointsEnumerable module help!!
I'm not sure where i'm going wrong
class Player
include Comparable
attr_accessor :name, :score
def <=>(other)
score <=> other.score
end
def initialize(name, score)
@name = name
@score = score
end
end
class Game
include Enumerable
attr_accessor :players
def each(&block)
players.each(&block)
end
def initialize
@players = []
end
end
end
1 Answer
henrywojnicki2
5,095 PointsYou should post the error message on the question page. It appears to be that you have to many end's and if this is the case your error should say something like: "unexpected keyword end, expecting end of input". If this was helpful please mark this as best answer
Andrei Burichita
9,989 PointsAndrei Burichita
9,989 Pointsyou have a double END ..just erase the last line and it should work