lib/codeguessing/console.rb in codeguessing-0.3.2 vs lib/codeguessing/console.rb in codeguessing-0.3.3
- old
+ new
@@ -79,10 +79,10 @@
def load(path)
YAML.load(File.open(path)) if File.exist?(path)
end
def save(name = 'Anonim')
- return if @game.state != true
+ return if @game.state != 'true'
@scores << @game.cur_score(name)
File.new(@path, 'w') unless File.exist?(@path)
File.open(@path, "r+") do |f|
f.write(@scores.to_yaml)
end