|
Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)
|
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. | |
| #define | RUBY_BIRTH_YEAR 1993 |
| Ruby's birth year. | |
| #define | RUBY_BIRTH_MONTH 2 |
| Ruby's birth month. | |
| #define | RUBY_BIRTH_DAY 24 |
| Ruby's birth day. | |
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. | |
| #define | RUBY_API_VERSION_MINOR 2 |
| Minor version. | |
| #define | RUBY_API_VERSION_TEENY 0 |
| Teeny version. | |
| #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. | |
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. | |
| const char | ruby_version [] |
| Stringised version. | |
| const char | ruby_release_date [] |
| Date of release, in a C string. | |
| const char | ruby_platform [] |
| Target platform identifier, in a C string. | |
| const int | ruby_patchlevel |
| This is a monotonic increasing integer that describes specific "patch" level. | |
| const char | ruby_description [] |
This is what ruby -v prints to the standard error. | |
| const char | ruby_copyright [] |
| Copyright notice. | |
| const char | ruby_engine [] |
This is just "ruby" for us. | |
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 2 |
| #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 79 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 }.