[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Dynamically referencing class constants?

Reid Thompson

6/14/2007 1:27:00 AM

On Thu, 2007-06-14 at 10:26 +0900, Reid Thompson wrote:
> On Thu, 2007-06-14 at 10:16 +0900, list. rb wrote:
> > How can I do this?
> >
> > Socket.constants.each {|i|
> > puts Socket::"#{i}" ##does not work of course
> > }
>
> puts "Socket::#{i}"
>
doh!!! sorry, missed the dereference...