Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
warning: default `to_a' will be obsolete
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Corbin  
View profile  
 More options Nov 26 2005, 1:10 pm
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JB Eriksson  
View profile  
 More options Nov 26 2005, 1:25 pm
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Nov 26 2005, 1:31 pm
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

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Schierbeck  
View profile  
 More options Nov 26 2005, 3:48 pm
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Neukirchen  
View profile  
 More options Nov 26 2005, 4:08 pm
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

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Edward Gray II  
View profile  
(1 user)  More options Nov 26 2005, 4:08 pm
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Trans  
View profile  
 More options Nov 26 2005, 5:27 pm
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yuri Kozlov  
View profile  
 More options Nov 27 2005, 2:12 am
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>

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Markus Koenig  
View profile  
 More options Nov 27 2005, 7:38 am
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google