Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

output Ruby version at ruby_startup on Ruby 2.x. #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mod_ruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,13 @@ static void ruby_add_path(const char *path)
static int ruby_startup(pool *p, pool *plog, pool *ptemp, server_rec *s)
{
ap_add_version_component(p, MOD_RUBY_STRING_VERSION);
#if RUBY_RELEASE_CODE > 20040624
#if RUBY_VM || RUBY_RELEASE_CODE > 20040624
{
char *version = apr_pstrcat(p, "Ruby/", ruby_version,
#if HAVE_RUBY_VERSION_H
apr_psprintf(ptemp, "p%d",
ruby_patchlevel),
#endif
"(", ruby_release_date, ")",
(char *) NULL);
ap_add_version_component(p, version);
Expand Down
3 changes: 3 additions & 0 deletions mod_ruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#include "ruby/io.h"
#include "ruby/util.h"
#include "ruby/intern.h"
#ifdef HAVE_RUBY_VERSION_H
#include "ruby/version.h"
#endif

void rb_thread_stop_timer_thread(void);
void rb_thread_start_timer_thread(void);
Expand Down