Predefined variables and constants question

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.

On Sat, 22 Jul 2006, Simon H. wrote:

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.

but that woudn’t be global then would it :wink:

-a

but that woudn’t be global then would it :wink:

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