An error occurs on the command line.
'+': no implicit conversation of fixnum into array <TypeError> from test.rb:117:in 'block <main>' from test.rb:107:in 'each' from test.rb:107:in '<main>' Below line 107-119:
for item in questions_yes do puts item user_input = nil while (user_input != "yes" and user_input !="no" ) puts "#{name}, введите ответ yes или no" user_input = STDIN.gets.chomp.downcase end if (user_input == "yes") correct_answers += 1 end end
correct_answersyou do not have an array, by any chance? - VenZellarray.each do |i|instead offor i in array do. - D-side