version.c File Reference

#include "ruby/ruby.h"
#include "version.h"
#include <stdio.h>

Go to the source code of this file.

Defines

#define PRINT(type)   puts(ruby_##type)
#define MKSTR(type)   rb_obj_freeze(rb_usascii_str_new(ruby_##type, sizeof(ruby_##type)-1))

Functions

void Init_version (void)
 Defines platform-depended Ruby-level constants.
void ruby_show_version (void)
 Prints the version information of the CRuby interpreter to stdout.
void ruby_show_copyright (void)
 Prints the copyright notice of the CRuby interpreter to stdout and exits this process successfully.

Variables

const int ruby_api_version []
const char ruby_version [] = RUBY_VERSION
const char ruby_release_date [] = RUBY_RELEASE_DATE
const char ruby_platform [] = RUBY_PLATFORM
const int ruby_patchlevel = RUBY_PATCHLEVEL
const char ruby_description [] = RUBY_DESCRIPTION
const char ruby_copyright [] = RUBY_COPYRIGHT
const char ruby_engine [] = "ruby"
VALUE ruby_engine_name = Qnil

Define Documentation

#define MKSTR ( type   )     rb_obj_freeze(rb_usascii_str_new(ruby_##type, sizeof(ruby_##type)-1))

Definition at line 21 of file version.c.

Referenced by Init_version().

#define PRINT ( type   )     puts(ruby_##type)

Definition at line 20 of file version.c.

Referenced by BSD_vfprintf(), ruby_show_copyright(), and ruby_show_version().


Function Documentation

void Init_version ( void   ) 

Defines platform-depended Ruby-level constants.

Definition at line 39 of file version.c.

References INT2FIX, MKSTR, rb_define_global_const(), ruby_engine_name, RUBY_PATCHLEVEL, RUBY_REVISION, and version().

void ruby_show_copyright ( void   ) 

Prints the copyright notice of the CRuby interpreter to stdout and exits this process successfully.

Definition at line 88 of file version.c.

References EXIT_SUCCESS, and PRINT.

Referenced by process_options().

void ruby_show_version ( void   ) 

Prints the version information of the CRuby interpreter to stdout.

Definition at line 78 of file version.c.

References PRINT.

Referenced by process_options().


Variable Documentation

const int ruby_api_version[]
Initial value:

Definition at line 23 of file version.c.

const char ruby_copyright[] = RUBY_COPYRIGHT

Definition at line 33 of file version.c.

const char ruby_description[] = RUBY_DESCRIPTION

Definition at line 32 of file version.c.

Referenced by rb_async_bug_errno(), and report_bug().

const char ruby_engine[] = "ruby"

Definition at line 34 of file version.c.

Definition at line 35 of file version.c.

Referenced by Init_version(), location_to_str(), and oldbt_init().

const int ruby_patchlevel = RUBY_PATCHLEVEL

Definition at line 31 of file version.c.

const char ruby_platform[] = RUBY_PLATFORM

Definition at line 30 of file version.c.

const char ruby_release_date[] = RUBY_RELEASE_DATE

Definition at line 29 of file version.c.

const char ruby_version[] = RUBY_VERSION

Definition at line 28 of file version.c.


Generated on 18 May 2020 for Ruby by  doxygen 1.6.1