Forum: Ruby RUBY_LIB, RUBY_ARCHLIB unavailable?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Adam Bozanich (Guest)
on 2007-06-29 06:58
(Received via mailing list)
Hello,

Is there a reason why the following constants aren't defined for the
ruby
runtime?   Is there another way to access them that I'm not finding?

Thanks,
-Adam

Index: version.c
===================================================================
--- version.c   (revision 12654)
+++ version.c   (working copy)
@@ -30,6 +30,13 @@
     rb_define_global_const("RUBY_RELEASE_DATE", d);
     rb_define_global_const("RUBY_PLATFORM", p);
     rb_define_global_const("RUBY_PATCHLEVEL",
INT2FIX(RUBY_PATCHLEVEL));
+
+
rb_define_global_const("RUBY_LIB",rb_obj_freeze(rb_str_new2(RUBY_LIB)));
+
rb_define_global_const("RUBY_SITE_LIB",rb_obj_freeze(rb_str_new2(RUBY_SITE_LIB)));
+
rb_define_global_const("RUBY_SITE_LIB2",rb_obj_freeze(rb_str_new2(RUBY_SITE_LIB2)));
+
rb_define_global_const("RUBY_ARCHLIB",rb_obj_freeze(rb_str_new2(RUBY_ARCHLIB)));
+
rb_define_global_const("RUBY_SITE_ARCHLIB",rb_obj_freeze(rb_str_new2(RUBY_SITE_ARCHLIB)));
+
 }

 void
Marcel Molina Jr. (Guest)
on 2007-06-29 07:03
(Received via mailing list)
On Fri, Jun 29, 2007 at 01:57:40PM +0900, Adam Bozanich wrote:
> Is there a reason why the following constants aren't defined for the ruby
> runtime?   Is there another way to access them that I'm not finding?

I don't know if there is a reason but you can look in Config::CONFIG
once you
require rbconfig:

% ruby -r pp -r rbconfig -e  'pp Config::CONFIG'

marcel
Adam Bozanich (Guest)
on 2007-06-29 07:10
(Received via mailing list)
On 6/28/07, Marcel Molina Jr. <marcel@vernix.org> wrote:
> % ruby -r pp -r rbconfig -e  'pp Config::CONFIG'
Thanks, just what I was looking for.

-Adam
This topic is locked and can not be replied to.