The capitalize and capitalize! method
Hi everyone! I just have a question about the usage of .capitalize method. Being more precise, about it's usage in an input, just like: print "What's your name?" name=gets.chop.capitalize I have tested in this way and just works perfectly, but then I knew about the .capitalize! print "What's your name?" name=gets.chop.capitalize! And I just realized that if I write in the input the words already capitalized, they simply don't return the word, the field appears blank. I get it that .capitalize! change the variable so then I'll not need to every time capitalize it when I need to print or something like that. But I don't get this kind of "bug". I don't know even if it's a bug, but really make me stop e think and I would really apreciate some help. Thank you already.