Hi, I'm also a newbie trying the Leap Year problem using while loops..
Can anyone advice why the following code doesn't work?  Much thanks!

puts "Enter starting year:"
      starting_year = gets.chomp.to_i
puts "Enter ending year:"
      ending_year = gets.chomp.to_i
while true
      year = starting_year
      if (year%4==0)&& (year%100!=0)
          puts year.to_s + ' is a Leap Year'
      end
    year = year +1
      break if year >= ending_year
end

-- 
Posted via http://www.ruby-forum.com/.