summaryrefslogtreecommitdiff
path: root/version.c
blob: 17b5af4a209964fe5eb9f9bfc5746299c92eab2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/************************************************

  version.c -

  $Author: matz $
  $Revision: 1.3 $
  $Date: 1994/08/18 07:06:32 $
  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()
{
    fprintf(stderr, "ruby - version %s (%s)\n", RUBY_VERSION, VERSION_DATE);
}

show_copyright()
{
    fprintf(stderr, "ruby - Copyright (C) 1994 Yukihiro Matsumoto\n");
    exit(0);
}