How to make a variable constant in ruby so that the value remains fixed throughout and cannot be altered at any cost -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
please checkout this http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Variables_and_Constants#Constants ---- Emad Elsaid a.k.a. (Blaze Boy) Websites Designer/Developer Mobile: +20 14 13 7 16 75 http://blazeeboy.blogspot.com On Thu, Sep 29, 2011 at 6:45 AM, sithara suresh <sithu.1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> How to make a variable constant in ruby so that the value remains > fixed throughout and cannot be altered at any cost > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sep 29, 12:45 am, sithara suresh <sithu.1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How to make a variable constant in ruby so that the value remains > fixed throughout and cannot be altered at any costFirst off, repeated posting doesn''t get you answers any faster - it just demonstrates full-on n00bishness. To answer your actual question, there isn''t any way to make a value that is truly un-alterable. See this post for more info: http://blog.jayfields.com/2006/12/ruby-constant-values.html If you''re depending on a programming language to defend you against programmers, you need to fire the programmers... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.