warning: default `to_a' will be obsolete
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.ruby
From:
David Corbin <dcor... @machturtle.com>
Date: Sun, 27 Nov 2005 03:10:24 +0900
Local: Sat, Nov 26 2005 1:10 pm
Subject: warning: default `to_a' will be obsolete
I'm getting this warning, which I think is new in 1.8.3. warning: default `to_a' will be obsolete
However, I can't find what the expected alternative is. Any pointers?
David
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
JB Eriksson <mrk... @gmail.com>
Date: Sun, 27 Nov 2005 03:25:15 +0900
Local: Sat, Nov 26 2005 1:25 pm
Subject: Re: warning: default `to_a' will be obsolete
On 11/26/05, David Corbin <dcor... @machturtle.com> wrote: > I'm getting this warning, which I think is new in 1.8.3.
> warning: default `to_a' will be obsolete
> However, I can't find what the expected alternative is. Any pointers?
> David
Object#to_a from ri: Returns an array representation of _obj_. For objects of class +Object+ and others that don't explicitly override the method, the return value is an array containing +self+. However, this latter behavior will soon be obsolete.
so it's this "return array containing self" that's going obsolete.
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
Christian Neukirchen <chneukirc... @gmail.com>
Date: Sun, 27 Nov 2005 03:31:02 +0900
Local: Sat, Nov 26 2005 1:31 pm
Subject: Re: warning: default `to_a' will be obsolete
David Corbin <dcor
... @machturtle.com> writes:
> I'm getting this warning, which I think is new in 1.8.3.
> warning: default `to_a' will be obsolete
> However, I can't find what the expected alternative is. Any pointers?
Use [*foo].
> David
-- Christian Neukirchen <chneukirc... @gmail.com> http://chneukirchen.org
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
Daniel Schierbeck <daniel.schierb... @gmail.com>
Date: Sat, 26 Nov 2005 21:48:58 +0100
Local: Sat, Nov 26 2005 3:48 pm
Subject: Re: warning: default `to_a' will be obsolete
Christian Neukirchen wrote:
> David Corbin <dcor
... @machturtle.com> writes:
>> I'm getting this warning, which I think is new in 1.8.3.
>> warning: default `to_a' will be obsolete
>> However, I can't find what the expected alternative is. Any pointers?
> Use [*foo].
>> David
That doesn't really look much clearer to me... Cheers, Daniel
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
Christian Neukirchen <chneukirc... @gmail.com>
Date: Sun, 27 Nov 2005 06:08:10 +0900
Local: Sat, Nov 26 2005 4:08 pm
Subject: Re: warning: default `to_a' will be obsolete
Daniel Schierbeck <daniel.schierb
... @gmail.com> writes:
> Christian Neukirchen wrote:
>> David Corbin <dcor
... @machturtle.com> writes:
>>> I'm getting this warning, which I think is new in 1.8.3.
>>> warning: default `to_a' will be obsolete
>>> However, I can't find what the expected alternative is. Any pointers? >> Use [*foo].
> That doesn't really look much clearer to me...
But it doesn't hurt duck-typing.
> Daniel
-- Christian Neukirchen <chneukirc... @gmail.com> http://chneukirchen.org
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
James Edward Gray II <ja... @grayproductions.net>
Date: Sun, 27 Nov 2005 06:08:19 +0900
Local: Sat, Nov 26 2005 4:08 pm
Subject: Re: warning: default `to_a' will be obsolete
On Nov 26, 2005, at 2:52 PM, Daniel Schierbeck wrote:
> Christian Neukirchen wrote:
>> David Corbin <dcor
... @machturtle.com> writes:
>>> I'm getting this warning, which I think is new in 1.8.3.
>>> warning: default `to_a' will be obsolete
>>> However, I can't find what the expected alternative is. Any >>> pointers? >> Use [*foo]. >>> David
> That doesn't really look much clearer to me...
Array( foo ) Same effect.
James Edward Gray II
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
"Trans" <transf... @gmail.com>
Date: 26 Nov 2005 14:27:05 -0800
Local: Sat, Nov 26 2005 5:27 pm
Subject: Re: warning: default `to_a' will be obsolete
> Array( foo )
Array[ foo ] T.
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
"Yuri Kozlov" <kozlo... @gmail.com>
Date: 26 Nov 2005 23:12:10 -0800
Local: Sun, Nov 27 2005 2:12 am
Subject: Re: warning: default `to_a' will be obsolete
and in the 1.9.0 it is already happens irb(main):001:0> x = 1 => 1 irb(main):002:0> x.to_a NoMethodError: undefined method `to_a' for 1:Fixnum from (irb):2 irb(main):003:0>
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.ruby
From:
Markus Koenig <mar... @stber-koenig.de>
Date: Sun, 27 Nov 2005 13:38:57 +0100
Local: Sun, Nov 27 2005 7:38 am
Subject: Re: warning: default `to_a' will be obsolete
Trans wrote:
>> Array( foo )
> Array[ foo ]
Not quite the same: foo = [1, 2, 3] Array(foo) => [1, 2, 3] Array[foo] => [[1, 2, 3]]
Markus
You must
Sign in before you can post messages.
You do not have the permission required to post.