diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-20 13:29:42 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-20 13:29:42 +0900 |
commit | d5ffbca5c4b0a6548cfb4bae36fab860861b529c (patch) | |
tree | ea32ae6058320e5931b39567311a6d5e9bb2192e /version.c | |
parent | 70ce3c8947c7f95897e56b397270c061dd50f280 (diff) |
Move `MKSTR` markers for fake.rb into coments
Diffstat (limited to 'version.c')
-rw-r--r-- | version.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -86,12 +86,14 @@ void Init_version(void) { enum {ruby_patchlevel = RUBY_PATCHLEVEL}; - VALUE version; - VALUE ruby_engine_name; + VALUE version = MKSTR(version); + VALUE ruby_engine_name = MKSTR(engine); + // MKSTR macro is a marker for fake.rb + /* * The running version of ruby */ - rb_define_global_const("RUBY_VERSION", (version = MKSTR(version))); + rb_define_global_const("RUBY_VERSION", /* MKSTR(version) */ version); /* * The date this ruby was released */ @@ -116,12 +118,12 @@ Init_version(void) /* * The engine or interpreter this ruby uses. */ - rb_define_global_const("RUBY_ENGINE", ruby_engine_name = MKSTR(engine)); + rb_define_global_const("RUBY_ENGINE", /* MKSTR(engine) */ ruby_engine_name); ruby_set_script_name(ruby_engine_name); /* * The version of the engine or interpreter this ruby uses. */ - rb_define_global_const("RUBY_ENGINE_VERSION", (1 ? version : MKSTR(version))); + rb_define_global_const("RUBY_ENGINE_VERSION", /* MKSTR(version) */ version); rb_provide("ruby2_keywords.rb"); } |