Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #2314
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail |
|---|---|
| From | Luk Mus <support@fit4u.su> |
| Newsgroups | comp.lang.ruby |
| Subject | Re: Autoconvert object from one class1 to other class2 in class1 def |
| Date | Tue, 5 Apr 2011 04:15:16 -0500 |
| Organization | Service de news de lacave.net |
| Lines | 23 |
| Message-ID | <48a449220f19a90143933ae377a0bbb3@ruby-forum.com> (permalink) |
| References | <5095fcbac456c1c2b31e5c05fbea960d@ruby-forum.com> <3962d67dedc7aa2c534540d17939bf1a@ruby-forum.com> |
| NNTP-Posting-Host | bristol.highgroove.com |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | talisker.lacave.net 1301994982 6298 65.111.164.187 (5 Apr 2011 09:16:22 GMT) |
| X-Complaints-To | abuse@lacave.net |
| NNTP-Posting-Date | Tue, 5 Apr 2011 09:16:22 +0000 (UTC) |
| In-Reply-To | <3962d67dedc7aa2c534540d17939bf1a@ruby-forum.com> |
| X-Received-From | This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway |
| X-Mail-Count | 380975 |
| X-Ml-Name | ruby-talk |
| X-Rubymirror | Yes |
| X-Ruby-Talk | <48a449220f19a90143933ae377a0bbb3@ruby-forum.com> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.ruby:2314 |
Show key headers only | View raw
Brian Candler wrote in post #990955:
>> or how get name of variable in class method?
>
> That's not possible either. The same object could be pointed to by many
> variables (local and/or global and/or instance), or by none. For
> example, maybe the only reference to the object is as a value in a Hash.
Thanks!
But i can get object_id:
class String
def get_id
puts self.__id__
puts self.object_id
end
end
Is it realy to get name by ID?
--
Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Autoconvert object from one class1 to other class2 in class1 def Luk Mus <support@fit4u.su> - 2011-04-05 03:02 -0500
Re: Autoconvert object from one class1 to other class2 in class1 def Luk Mus <support@fit4u.su> - 2011-04-05 03:19 -0500
Re: Autoconvert object from one class1 to other class2 in class1 def Brian Candler <b.candler@pobox.com> - 2011-04-05 03:46 -0500
Re: Autoconvert object from one class1 to other class2 in class1 def Luk Mus <support@fit4u.su> - 2011-04-05 04:15 -0500
Re: Autoconvert object from one class1 to other class2 in class1 def Brian Candler <b.candler@pobox.com> - 2011-04-05 07:41 -0500
Re: Autoconvert object from one class1 to other class2 in class1 def Adam Prescott <adam@aprescott.com> - 2011-04-05 07:50 -0500
Re: Autoconvert object from one class1 to other class2 in class1 def Robert Klemme <shortcutter@googlemail.com> - 2011-04-05 07:56 -0500
csiph-web