1 /**********************************************************************
6 created at: Thu Sep 30 20:08:01 JST 1993
8 Copyright (C) 1993-2007 Yukihiro Matsumoto
10 **********************************************************************/
12 #include "ruby/ruby.h"
16 #define PRINT(type) puts(ruby_##type)
17 #define MKSTR(type) rb_obj_freeze(rb_usascii_str_new(ruby_##type, sizeof(ruby_##type)-1))
19 const char ruby_version
[] = RUBY_VERSION
;
20 const char ruby_release_date
[] = RUBY_RELEASE_DATE
;
21 const char ruby_platform
[] = RUBY_PLATFORM
;
22 const int ruby_patchlevel
= RUBY_PATCHLEVEL
;
23 const char ruby_description
[] = RUBY_DESCRIPTION
;
24 const char ruby_copyright
[] = RUBY_COPYRIGHT
;
25 const char ruby_engine
[] = "ruby";
30 rb_define_global_const("RUBY_VERSION", MKSTR(version
));
31 rb_define_global_const("RUBY_RELEASE_DATE", MKSTR(release_date
));
32 rb_define_global_const("RUBY_PLATFORM", MKSTR(platform
));
33 rb_define_global_const("RUBY_PATCHLEVEL", INT2FIX(RUBY_PATCHLEVEL
));
34 rb_define_global_const("RUBY_REVISION", INT2FIX(RUBY_REVISION
));
35 rb_define_global_const("RUBY_DESCRIPTION", MKSTR(description
));
36 rb_define_global_const("RUBY_COPYRIGHT", MKSTR(copyright
));
37 rb_define_global_const("RUBY_ENGINE", MKSTR(engine
));
41 ruby_show_version(void)
48 ruby_show_copyright(void)