From: Robert Dober Date: 2009-06-28T01:53:56+09:00 Subject: Re: Trying to define a 'class' without using 'class' sentence On 6/27/09, Fernando Guillen wrote: > Robert Dober wrote: > >> and from within Ruby there are several pieces of information you might >> find useful: >> >> http://pastie.org/526389 > > Thanks Robert.. very funny code :) > > But still I don't know too much about my interpreter: > > $ ruby -e 'puts Object.constants.grep( /RUBY/ ).map{ |c| "##{[c, > Object.const_get(c)].inspect}"}' > #["RUBY_VERSION", "1.8.6"] > #["RUBY_PATCHLEVEL", 287] > #["RUBY_RELEASE_DATE", "2008-08-11"] > #["RUBY_PLATFORM", "universal-darwin9.0"] > > :/ > > Is this the relevant information about the kind of my interpreter is? As far as I am concerned this contains about anything you need to know. Are you missing something specific? > > #["RUBY_PLATFORM", "universal-darwin9.0"] This is the platform Ruby was built for, seems to be OS-X. But the VERSION and PATCHLEVEL is more important concerning the "behavior" of the interpreter or VM. In your case MRI with a quite recent patchlevel. Congrats ;) This, however is a more conservative Ruby version. You might want 1.8.7 or 1.9.1 for exploration. Remark that JRuby uses "java" as a platform. This is surely to indicate that it will run wherever Java runs. HTH Robert -- Toutes les grandes personnes ont d’abord été des enfants, mais peu d’entre elles s’en souviennent. All adults have been children first, but not many remember. [Antoine de Saint-Exupéry]