fixed minor bug in number guessing game
This commit is contained in:
parent
df4e19edb3
commit
b56a05e71c
|
@ -447,8 +447,8 @@ e.g: show-method hello_method
|
|||
count = 0
|
||||
while(true)
|
||||
count += 1
|
||||
str = Readline.readline("game > ", true).chomp
|
||||
break if str == "."
|
||||
str = Readline.readline("game > ", true)
|
||||
break if str == "." || !str
|
||||
val = str.to_i
|
||||
output.puts "Too large!" if val > num
|
||||
output.puts "Too small!" if val < num
|
||||
|
|
Loading…
Reference in New Issue