From: Joseph Pecoraro Date: 2007-12-16T15:12:31+09:00 Subject: Re: How t owrite an OR statement > while again != "y" || "n" These don't use the OR logic, but they are similiar. until again ~= /^[yn]/i do ... end Or if your wanted to keep the while keyword you could do this as: while again[0] != /^[^yn]/i do ... end I don't know if you can do exactly what you are trying to do with that syntax. You can reconstruct the logic like this: while again != "y" && again != "n" do ... end Here is another approach more along the lines of what you have (is something in a list of something else), likewise the until loop could be made a while loop: good_chars = %w(y n) #=> ['y', 'n'] until good_chars.include? again do ... end -- Posted via http://www.ruby-forum.com/.