From: John Joyce Date: 2007-05-11T12:03:00+09:00 Subject: Re: to_a On May 11, 2007, at 7:04 AM, Ari Brown wrote: > Ok, I seemed to have fixed it. .to_a works, but what I need > was .split(//). I never knew until now that it puts it into an > array for you! > > On May 10, 2007, at 6:01 PM, Robert Dober wrote: > >> On 5/10/07, Ari Brown wrote: >>> Howdy, jewel hunters >>> >>> I've been working on the Credit Card problem, and am >>> using the >>> command .to_a to put my numbers into an array. >>> >>> However, I get a warning everytime I do so: >>> #122_CreditCards.rb:45: warning: default `to_a' will be obsolete >>> >>> What should I do instead of to_a? >> This depends on the content of line 45 of 122_CreditCards.rb ;) >> Would you mind sharing it (with some context lines) with us? > > -------------------------------------------------------| > ~ Ari > crap my sig won't fit > > > Ari, warnings about deprecations are just that. Warnings. They ARE true. In the future these things will be removed and their replacements already exist. Sometimes they are just synonyms and sometimes they are actually different implementations. Any time you see such a warning just try to find the method that should be used instead ( ri is a good way to check this, there is usually some blurb telling you the alternative method.) Generally, Matz is slow about completely removing that functionality to give time for people to change and refactor old code. But don't depend on it.