I am learning from the book beginning ruby on rails by Steve Holzner, and am trying out some of the code in the book:
#!/usr/bin/env ruby
until($_ != "q")
puts "Running"
print "Enter q to quit: "
gets
chomp
end
When I run the Program, nothing happens!
$_isnilwhen the process starts. So, theuntilcondition is immediately satisfied, and doesn’t even run the loop once.