11155
(-- --)
1
In this lesson, I am learning optional block.
class Library
attr_accessor :games
def initialize(games)
@games = games
end
def list
games.each do |game|
if block_given?
puts yield game
else
puts game.name
end
end
end
When I summit code, it shows syntax error, unexpected end_of_file.
I can't solve this problem, please help!!!!!!
Monika_M
(Monika M)
2
Hi Naomi
You have missed one ‘end’. Put ‘end’ at the end of the file.
If you had used proper intendation you had seen that an end is missing.
11155
(-- --)
4
Monika M wrote in post #1150695:
Hi Naomi
You have missed one 'end'. Put 'end' at the end of the file.
Thank you so much. 
11155
(-- --)
5
Norbert Melzer wrote in post #1150694:
If you had used proper intendation you had seen that an end is missing.
Thank you. 