I am reading an ancient(but good) tutorial on Test::Unit It states that you can not use a symbol to access items in the assigns hash and must use a string identifier. I would think that would have been fixed at this point. http://manuals.rubyonrails.com/read/chapter/28 Thanks in advance --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Sep-03 06:29 UTC
Re: Can I now use a symbol to access the assigns hash?
On 3 Sep 2008, at 06:12, Ruby Freak wrote:> > I am reading an ancient(but good) tutorial on Test::Unit > It states that you can not use a symbol to access items in the assigns > hash and must use a string identifier. I would think that would have > been fixed at this point. > > http://manuals.rubyonrails.com/read/chapter/28 >Should be a pretty easy experiment to verify this. Personally I wouldn''t consider this a bug. Strings and symbols are generally not interchangeable (only the params hash maintains that illusion - see http://blog.hasmanythrough.com/2008/4/19/symbols-are-not-pretty-strings for some of the reasons behind this) Fred> Thanks in advance > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---