summaryrefslogtreecommitdiff
path: root/version.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-25 12:01:41 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-25 12:01:41 (GMT)
commitec37ab2efeb67b23dcaf2a9891aad2e70d29e4bc (patch)
treeaab619048df330eff7d27cb231c554184ce31389 /version.c
parent384df36250d273583b7dba5f45934bd0b96268e1 (diff)
* version.c (ruby_show_copyright): obtain copyright year from
RUBY_RELEASE_YEAR. * win32/resource.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'version.c')
-rw-r--r--version.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/version.c b/version.c
index 87b9e0f..0f0bfd3 100644
--- a/version.c
+++ b/version.c
@@ -14,12 +14,16 @@
#include "version.h"
#include <stdio.h>
+const char ruby_version[] = RUBY_VERSION;
+const char ruby_release_date[] = RUBY_RELEASE_DATE;
+const char ruby_platform[] = RUBY_PLATFORM;
+
void
Init_version()
{
- VALUE v = rb_obj_freeze(rb_str_new2(RUBY_VERSION));
- VALUE d = rb_obj_freeze(rb_str_new2(RUBY_RELEASE_DATE));
- VALUE p = rb_obj_freeze(rb_str_new2(RUBY_PLATFORM));
+ VALUE v = rb_obj_freeze(rb_str_new2(ruby_version));
+ VALUE d = rb_obj_freeze(rb_str_new2(ruby_release_date));
+ VALUE p = rb_obj_freeze(rb_str_new2(ruby_platform));
rb_define_global_const("RUBY_VERSION", v);
rb_define_global_const("RUBY_RELEASE_DATE", d);
@@ -35,6 +39,6 @@ ruby_show_version()
void
ruby_show_copyright()
{
- printf("ruby - Copyright (C) 1993-2003 Yukihiro Matsumoto\n");
+ printf("ruby - Copyright (C) 1993-%d Yukihiro Matsumoto\n", RUBY_RELEASE_YEAR);
exit(0);
}