Move `MKSTR` markers for fake.rb into coments

This commit is contained in:
Nobuyoshi Nakada 2023-08-20 13:29:42 +09:00
Родитель 70ce3c8947
Коммит d5ffbca5c4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3582D74E1FEE4465
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -86,12 +86,14 @@ void
Init_version(void) Init_version(void)
{ {
enum {ruby_patchlevel = RUBY_PATCHLEVEL}; enum {ruby_patchlevel = RUBY_PATCHLEVEL};
VALUE version; VALUE version = MKSTR(version);
VALUE ruby_engine_name; VALUE ruby_engine_name = MKSTR(engine);
// MKSTR macro is a marker for fake.rb
/* /*
* The running version of ruby * 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 * The date this ruby was released
*/ */
@ -116,12 +118,12 @@ Init_version(void)
/* /*
* The engine or interpreter this ruby uses. * 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); ruby_set_script_name(ruby_engine_name);
/* /*
* The version of the engine or interpreter this ruby uses. * 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"); rb_provide("ruby2_keywords.rb");
} }