summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--common.mk2
-rw-r--r--error.c5
-rw-r--r--version.c12
-rw-r--r--win32/resource.rb2
5 files changed, 20 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index cd3873bb37f..46497c813f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Mar 25 21:01:32 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * version.c (ruby_show_copyright): obtain copyright year from
+ RUBY_RELEASE_YEAR.
+
+ * win32/resource.rb: ditto.
+
Thu Mar 25 19:37:35 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* win32/resource.rb: default rubyw icon to ruby.ico, and let DLL also
diff --git a/common.mk b/common.mk
index ed516751d5f..62733cbcdf9 100644
--- a/common.mk
+++ b/common.mk
@@ -199,7 +199,7 @@ enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \
{$(VPATH)}node.h {$(VPATH)}util.h
error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h config.h \
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
- {$(VPATH)}env.h {$(VPATH)}version.h {$(VPATH)}st.h
+ {$(VPATH)}env.h {$(VPATH)}st.h
euc_jp.$(OBJEXT): {$(VPATH)}euc_jp.c {$(VPATH)}regenc.h \
{$(VPATH)}oniguruma.h
eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}ruby.h config.h \
diff --git a/error.c b/error.c
index efa43f38aea..8dbd3434cef 100644
--- a/error.c
+++ b/error.c
@@ -12,7 +12,6 @@
#include "ruby.h"
#include "env.h"
-#include "version.h"
#include "st.h"
#include <stdio.h>
@@ -24,6 +23,8 @@
#define va_init_list(a,b) va_start(a)
#endif
+extern const char ruby_version[], ruby_release_date[], ruby_platform[];
+
int ruby_nerrs;
static int
@@ -202,7 +203,7 @@ rb_bug(fmt, va_alist)
vfprintf(out, fmt, args);
va_end(args);
fprintf(out, "\nruby %s (%s) [%s]\n\n",
- RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
+ ruby_version, ruby_release_date, ruby_platform);
}
abort();
}
diff --git a/version.c b/version.c
index 87b9e0ffabc..0f0bfd361ed 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);
}
diff --git a/win32/resource.rb b/win32/resource.rb
index 62defb1d80b..0bfebf2d631 100644
--- a/win32/resource.rb
+++ b/win32/resource.rb
@@ -78,7 +78,7 @@ BEGIN
VALUE "FileVersion", "#{fversion}\\0"
VALUE "Home Page", "http://www.ruby-lang.org/\\0"
VALUE "InternalName", "#{base + ext}\\0"
- VALUE "LegalCopyright", "Copyright (C) 1993-2003 Yukihiro Matsumoto\\0"
+ VALUE "LegalCopyright", "Copyright (C) 1993-#{RUBY_RELEASE_DATE[/\d+/]} Yukihiro Matsumoto\\0"
VALUE "OriginalFilename", "#{base + ext}\\0"
VALUE "Platform", "#{RUBY_PLATFORM}\\0"
VALUE "ProductVersion", "#{fversion}\\0"