Ruby
3.4.0dev (2024-11-22 revision 37a72b0150ec36b4ea27175039afc28c62207b0c)
|
Go to the source code of this file.
Macros | |
The origin. | |
These information never change. Just written here to remember. | |
#define | RUBY_AUTHOR "Yukihiro Matsumoto" |
Author of this project. More... | |
#define | RUBY_BIRTH_YEAR 1993 |
Ruby's birth year. More... | |
#define | RUBY_BIRTH_MONTH 2 |
Ruby's birth month. More... | |
#define | RUBY_BIRTH_DAY 24 |
Ruby's birth day. More... | |
The API version. | |
API version is different from binary version. These numbers are for API stability. When you have distinct API versions x and y, you cannot expect codes targeted to x also works for y. However let us repeat here that it's a BAD idea to check RUBY_API_VERSION_CODE form extension libraries. Different API versions are just different. There is no such thing like upper compatibility. | |
#define | RUBY_API_VERSION_MAJOR 3 |
Major version. More... | |
#define | RUBY_API_VERSION_MINOR 4 |
Minor version. More... | |
#define | RUBY_API_VERSION_TEENY 0 |
Teeny version. More... | |
#define | RUBY_API_VERSION_CODE (RUBY_API_VERSION_MAJOR*10000+RUBY_API_VERSION_MINOR*100+RUBY_API_VERSION_TEENY) |
This macro is API versions encoded into a C integer. More... | |
Variables | |
Interfaces from extension libraries. | |
Before using these infos, think thrice whether they are really necessary or not, and if the answer was yes, think twice a week later again. | |
const int | ruby_api_version [3] |
API versions, in { major, minor, teeny } order. More... | |
const char | ruby_version [] |
Stringised version. More... | |
const char | ruby_release_date [] |
Date of release, in a C string. More... | |
const char | ruby_platform [] |
Target platform identifier, in a C string. More... | |
const int | ruby_patchlevel |
This is a monotonic increasing integer that describes specific "patch" level. More... | |
const char | ruby_description [] |
This is what ruby -v prints to the standard error. More... | |
const char | ruby_copyright [] |
Copyright notice. More... | |
const char | ruby_engine [] |
This is just "ruby" for us. More... | |
This file contains only
Never try to check RUBY_VERSION_CODE etc in extension libraries, check the features with mkmf.rb instead.
Definition in file version.h.
#define RUBY_API_VERSION_CODE (RUBY_API_VERSION_MAJOR*10000+RUBY_API_VERSION_MINOR*100+RUBY_API_VERSION_TEENY) |
#define RUBY_API_VERSION_MAJOR 3 |
#define RUBY_API_VERSION_MINOR 4 |
#define RUBY_API_VERSION_TEENY 0 |
#define RUBY_AUTHOR "Yukihiro Matsumoto" |
|
extern |
|
extern |
|
extern |
This is just "ruby"
for us.
But different implementations can have different strings here.
Definition at line 85 of file version.c.
Referenced by ruby_process_options().
|
extern |
This is a monotonic increasing integer that describes specific "patch" level.
You can know the exact changeset your binary is running by this info (and ruby_version), unless this is -1. -1 means there is no release yet for the version; ruby is actively developed. 0 means the initial GA version.
|
extern |
Target platform identifier, in a C string.
"x64_64-linux"
while its target triplet is x86_64-pc-linux-gnu
.
|
extern |
|
extern |
Stringised version.
"2.5.9"
when ruby_api_version was { 2, 5, 0 }
.