summaryrefslogtreecommitdiff
path: root/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'version.c')
-rw-r--r--version.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/version.c b/version.c
new file mode 100644
index 0000000..b671b46
--- /dev/null
+++ b/version.c
@@ -0,0 +1,31 @@
+/************************************************
+
+ version.c -
+
+ $Author: matz $
+ $Revision: 1.1.1.1 $
+ $Date: 1994/06/17 14:23:51 $
+ created at: Thu Sep 30 20:08:01 JST 1993
+
+ Copyright (C) 1994 Yukihiro Matsumoto
+
+************************************************/
+
+#include "ruby.h"
+#include "version.h"
+#include <stdio.h>
+
+static VALUE rb_version;
+
+VALUE rb_readonly_hook();
+
+Init_version()
+{
+ rb_version = str_new2(RUBY_VERSION);
+ rb_define_variable("$VERSION", &rb_version, Qnil, rb_readonly_hook);
+}
+
+show_version()
+{
+ printf("ruby - version %s (%s)\n", RUBY_VERSION, VERSION_DATE);
+}