diff --git a/mod_ruby.c b/mod_ruby.c index ebe4190..e77eff3 100644 --- a/mod_ruby.c +++ b/mod_ruby.c @@ -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); diff --git a/mod_ruby.h b/mod_ruby.h index 779a4c4..3ccf6fa 100644 --- a/mod_ruby.h +++ b/mod_ruby.h @@ -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);