1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[ruby] Show version

This commit is contained in:
Witold Filipczyk 2022-01-07 18:59:22 +01:00
parent 8efb3b8a76
commit 15d97cae07

View File

@ -5,6 +5,7 @@
#endif #endif
#include <ruby.h> #include <ruby.h>
#include <ruby/version.h>
#undef _ #undef _
@ -218,6 +219,8 @@ init_erb_module(void)
} }
static char elrubyversion[32];
void void
init_ruby(struct module *module) init_ruby(struct module *module)
{ {
@ -236,6 +239,9 @@ init_ruby(struct module *module)
/* Set up the ELinks module interface. */ /* Set up the ELinks module interface. */
init_erb_module(); init_erb_module();
snprintf(elrubyversion, 31, "Ruby %s", ruby_version);
module->name = elrubyversion;
if (elinks_home) { if (elinks_home) {
path = straconcat(elinks_home, RUBY_HOOKS_FILENAME, path = straconcat(elinks_home, RUBY_HOOKS_FILENAME,
(char *) NULL); (char *) NULL);