[lnkForumImage]
TotalShareware - Download Free Software

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


 

Bertram Scharpf

3/20/2005 2:52:00 PM

Hi,


what's the use of class Values below Array?

Google finds everything when I ask 'ruby values.new', e.g.

Thanks in advance.


Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...


2 Answers

ES

3/20/2005 3:08:00 PM

0


In data 3/20/2005, "Bertram Scharpf" <lists@bertram-scharpf.de> ha
scritto:

>Hi,
>
>
>what's the use of class Values below Array?
>
>Google finds everything when I ask 'ruby values.new', e.g.

I think CGI or some other web library used Values for something,
maybe? Where did you come across it?

>Thanks in advance.
>
>
>Bertram

E



Bertram Scharpf

3/20/2005 5:33:00 PM

0

Hi,

Am Montag, 21. Mär 2005, 00:07:45 +0900 schrieb ES:
> In data 3/20/2005, "Bertram Scharpf" <lists@bertram-scharpf.de> ha
> scritto:
>
> >what's the use of class Values below Array?
> >
> >Google finds everything when I ask 'ruby values.new', e.g.
>
> I think CGI or some other web library used Values for something,
> maybe? Where did you come across it?

I'm assembling a quick reference. I find out predefined
classes by:

c = self.class.constants.select do |x|
(eval x+".class") <= Class
end.map do |x|
ancs = eval x + ".ancestors"
ancs.reject! { |y| y.class > Class }
ancs.map! { |y| y.name }
ancs.reverse!
[ ancs, x]
end.sort!

puts c.map { |a,x| " " * a.length + x }

Saying

$ find ruby-cvs -type f -exec grep -nH rb_cValues {} \;

finds almost nothing.

Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...