2000-05-01 13:42:38 +04:00
|
|
|
/**********************************************************************
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
version.c -
|
|
|
|
|
|
|
|
$Author$
|
|
|
|
$Date$
|
|
|
|
created at: Thu Sep 30 20:08:01 JST 1993
|
|
|
|
|
2001-02-14 08:52:06 +03:00
|
|
|
Copyright (C) 1993-2001 Yukihiro Matsumoto
|
1998-01-16 15:13:05 +03:00
|
|
|
|
2000-05-01 13:42:38 +04:00
|
|
|
**********************************************************************/
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
#include "ruby.h"
|
|
|
|
#include "version.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
void
|
|
|
|
Init_version()
|
|
|
|
{
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE v = rb_str_new2(RUBY_VERSION);
|
|
|
|
VALUE d = rb_str_new2(RUBY_RELEASE_DATE);
|
|
|
|
VALUE p = rb_str_new2(RUBY_PLATFORM);
|
|
|
|
|
|
|
|
rb_define_global_const("RUBY_VERSION", v);
|
|
|
|
rb_define_global_const("RUBY_RELEASE_DATE", d);
|
|
|
|
rb_define_global_const("RUBY_PLATFORM", p);
|
|
|
|
|
|
|
|
/* obsolete constants */
|
|
|
|
rb_define_global_const("VERSION", v);
|
|
|
|
rb_define_global_const("RELEASE_DATE", d);
|
|
|
|
rb_define_global_const("PLATFORM", p);
|
1998-01-16 15:13:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1999-01-20 07:59:39 +03:00
|
|
|
ruby_show_version()
|
1998-01-16 15:13:05 +03:00
|
|
|
{
|
1999-08-13 09:45:20 +04:00
|
|
|
printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
|
1998-01-16 15:13:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1999-01-20 07:59:39 +03:00
|
|
|
ruby_show_copyright()
|
1998-01-16 15:13:05 +03:00
|
|
|
{
|
2001-02-14 08:52:06 +03:00
|
|
|
printf("ruby - Copyright (C) 1993-2001 Yukihiro Matsumoto\n");
|
1998-01-16 15:13:05 +03:00
|
|
|
exit(0);
|
|
|
|
}
|