On Thu, Mar 21, 2013 at 8:52 AM, Robert Walker <li...@ruby-forum.com> wrote: > Dheeraj Kumar wrote in post #1102510: >> In ruby, any variable whose name starts with a capital letter becomes a >> constant. > > In my previous post I was speaking more to the naming conventions used > in Ruby. Variable names are lowercase_understored and constants are > UPPER_CASE_UNDERSCORED. > > The mechanics of Ruby don't enforce this convention, outside of > presenting a warning when "constants" (any variable name starting with > an uppercase letter) are changed after initialization.
Convention doesn't equal required. The only reliably enforced "convention" is that classes must begin with a capital letter, it does not enforce CamalCase, it does not prevent Capital_Snake_Case. Ruby does not even disallow CamelConstants (even though technically classes are constants.) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.