Q
Q
quges12016-02-05 12:16:08
ruby
quges1, 2016-02-05 12:16:08

While looping in Ruby. What's wrong?

I decided to learn Ruby. I came across an online book, but one example does not run correctly on my computer.
7fcb8e302b4f41d88400b29bff018cbb.png
The while loop does not end when you type "while". Although it is clear from the logic that the cycle must end. The example was copied and pasted into the editor, so there should not be an error. I don't understand what is wrong. Please help me figure it out :)
234aab662ec64358bc80e4d5da218a04.png
www.shokhirev.com/mikhail/ruby/ltp/Chapter06.html

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Grudinkin, 2016-02-05
@Hunt666

Apparently, the problem is with the Cyrillic alphabet, if you change it to the Latin alphabet, everything works, saved it in utf-8 under Windows.

M
mlwrm, 2016-02-06
@malworm

quges1 you really have problems with Cyrillic. Under Linux, the code works well. Try to add in the first line of the program code
or
Or use English instead of Russian :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question