El Jueves, 8 de Mayo de 2008, Roger Pack escribió: > > I'd rather use to_sym instead of to_s. > > > > matz. > > I'd use either one except that [quoting Tim Harper] > > once a symbol is allocated, it is never garbage collected. > > This opens up a potential DOS attack: if you convert any user input to > symbols (via #to_sym or #intern), they could easily fill your symbol > space up and eat all of the available system memory. > > We'd all be wiser than I was a few minutes ago to keep this present when > deciding whether to use symbols or strings: > > http://blog.hasmanythrough.com/2008/4/19/symbols-are-not-pretty-strings Thanks a lot for that explanation. Finally I'll use only symbols and force method arguments to be symbols. Parameters will only be created via coding andnot via HTTP request and so. Thanks a lot. -- Iñaki Baz Castillo