summaryrefslogtreecommitdiff
path: root/version.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-09 09:21:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-09 09:21:37 +0000
commitc1241cd2ed230573bb81b52173d6cd2bd91176f2 (patch)
treecaa3babd9a35b930814fffa9c8ebb3366d46dae8 /version.c
parent17ae11ca25d210da8c7deeeee0f03fd1a09ee0b2 (diff)
thread bugs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'version.c')
-rw-r--r--version.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/version.c b/version.c
index 28970cd..57039d5 100644
--- a/version.c
+++ b/version.c
@@ -18,20 +18,29 @@
void
Init_version()
{
- rb_define_global_const("VERSION", rb_str_new2(RUBY_VERSION));
- rb_define_global_const("RELEASE_DATE", rb_str_new2(RUBY_RELEASE_DATE));
- rb_define_global_const("PLATFORM", rb_str_new2(RUBY_PLATFORM));
+ 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);
}
void
ruby_show_version()
{
- fprintf(stderr, "ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
+ printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
}
void
ruby_show_copyright()
{
- fprintf(stderr, "ruby - Copyright (C) 1993-1999 Yukihiro Matsumoto\n");
+ printf("ruby - Copyright (C) 1993-1999 Yukihiro Matsumoto\n");
exit(0);
}