From: JD KF Date: 2012-12-06T13:02:44+09:00 Subject: Having isues with capitalizing words So, this is a method I have made: def title(words) words.gsub(/(\A|\s)\w/) do |word| if(word!="and" || word!="an" || word!="the") word.upcase else word.downcase end end end I have been trying to solve this for the longest time and I can't figure it out. All I want the method to do is take in a string and capitalize every word except for "and" and "an" and "the". The above will not do it and I really don't understand why. I have tried a million versions of it as well. Can someone help me get in the right direction with this? -- Posted via http://www.ruby-forum.com/.