Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
predefined variables and constants question
simonh
7/22/2006 2:21:00 PM
hi all. pages 333 to 337 in pickaxe2 list a whole load of global
variables/constants, execution environment variables, standard objects
etc.
Is it just me or does this not seem to break with the usually
beautifully tidy, object oriented design of Ruby? I would have thought
all such things would have been defined in a class named something like
'Global'
I do not mean any offence to Matz and co. and there are probably good
reasons for things being as they are.
--
Posted via
http://www.ruby-...
.
2 Answers
Ara.T.Howard
7/22/2006 2:27:00 PM
0
simonh
7/22/2006 2:46:00 PM
0
> but that woudn't be global then would it ;-)
Not sure I follow. Class Object is available at all times throughout a
ruby program so is therefore global. Wouldn't a class called Global (or
whatever) also be? Then one could maybe do:
Global.constants
Global.variables
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
predefined variables and constants question
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password