Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions | Variables
version.c File Reference
`#include "ruby/ruby.h"`
`#include "version.h"`
`#include "vm_core.h"`
`#include "mjit.h"`
`#include <stdio.h>`

Go to the source code of this file.

## Macros
#define | EXIT_SUCCESS 0
#define | PRINT(type) puts(ruby_##type)
#define | MKSTR(type) rb_obj_freeze(rb_usascii_str_new_static(ruby_##type, sizeof(ruby_##type)-1))
#define | MKINT(name) INT2FIX(ruby_##name)
#define | RUBY_VERSION
#define | RUBY_FULL_REVISION RUBY_REVISION
#define | MJIT_OPTS_ON 0

## Functions
void | Init_version (void)
| Defines platform-depended Ruby-level constants. More...
void | Init_ruby_description (void)
void | ruby_show_version (void)
| Prints the version information of the CRuby interpreter to stdout. More...
void | ruby_show_copyright (void)
| Prints the copyright notice of the CRuby interpreter to stdout. More...

## Variables
const int | ruby_api_version []
const char | ruby_version [] = RUBY_VERSION
const char | ruby_revision [] = RUBY_FULL_REVISION
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_WITH("")
const char | ruby_copyright [] = RUBY_COPYRIGHT
const char | ruby_engine [] = "ruby"

## Macro Definition Documentation

## ◆ EXIT_SUCCESS

#define EXIT_SUCCESS 0

Definition at line 19 of file version.c.

## ◆ MJIT_OPTS_ON

#define MJIT_OPTS_ON 0

Definition at line 96 of file version.c.

## ◆ MKINT

#define MKINT | ( |  | name | ) | INT2FIX(ruby_##name)

Definition at line 24 of file version.c.

## ◆ MKSTR

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

Definition at line 23 of file version.c.

## ◆ PRINT

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

Definition at line 22 of file version.c.

## ◆ RUBY_FULL_REVISION

#define RUBY_FULL_REVISION RUBY_REVISION

Definition at line 36 of file version.c.

## ◆ RUBY_VERSION

#define RUBY_VERSION

Value:
STRINGIZE(RUBY_VERSION_MAJOR) "." \
STRINGIZE(RUBY_VERSION_MINOR) "." \
STRINGIZE(RUBY_VERSION_TEENY) ""

Definition at line 31 of file version.c.

## Function Documentation

## ◆ Init_ruby_description()

void Init_ruby_description | ( | void |  | ) |

Definition at line 100 of file version.c.

References MJIT_OPTS_ON, MKSTR, and rb_define_global_const().

## ◆ Init_version()

void Init_version | ( | void |  | ) |

Defines platform-depended Ruby-level constants.

Definition at line 50 of file version.c.

References RUBY_PATCHLEVEL, and ruby_patchlevel.

## Variable Documentation

## ◆ ruby_api_version

const int ruby_api_version[]

Initial value:
= {
RUBY_API_VERSION_MAJOR,
RUBY_API_VERSION_MINOR,
RUBY_API_VERSION_TEENY,
}

Definition at line 26 of file version.c.

## ◆ ruby_copyright

const char ruby_copyright[] = RUBY_COPYRIGHT

Definition at line 45 of file version.c.

## ◆ ruby_engine

const char ruby_engine[] = "ruby"

Definition at line 46 of file version.c.

Referenced by ruby_process_options().

## ◆ ruby_patchlevel

const int ruby_patchlevel = RUBY_PATCHLEVEL

Definition at line 42 of file version.c.

Referenced by Init_version().

## ◆ ruby_platform

const char ruby_platform[] = RUBY_PLATFORM

Definition at line 41 of file version.c.

## ◆ ruby_release_date

const char ruby_release_date[] = RUBY_RELEASE_DATE

Definition at line 40 of file version.c.

## ◆ ruby_revision

const char ruby_revision[] = RUBY_FULL_REVISION

Definition at line 39 of file version.c.

## ◆ ruby_version

const char ruby_version[] = RUBY_VERSION

Definition at line 38 of file version.c.

RUBY_API_VERSION_MAJOR
#define RUBY_API_VERSION_MAJOR
Definition: version.h:33
RUBY_VERSION_MAJOR
#define RUBY_VERSION_MAJOR
Definition: version.h:1
RUBY_VERSION_MINOR
#define RUBY_VERSION_MINOR
Definition: version.h:2
RUBY_API_VERSION_TEENY
#define RUBY_API_VERSION_TEENY
Definition: version.h:35
RUBY_API_VERSION_MINOR
#define RUBY_API_VERSION_MINOR
Definition: version.h:34
RUBY_VERSION_TEENY
#define RUBY_VERSION_TEENY
Definition: version.h:3
STRINGIZE
#define STRINGIZE(expr)
Definition: defines.h:331