summaryrefslogtreecommitdiff
path: root/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'version.c')
-rw-r--r--version.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/version.c b/version.c
index 63c519a6f4..b235673001 100644
--- a/version.c
+++ b/version.c
@@ -17,6 +17,7 @@
const char ruby_version[] = RUBY_VERSION;
const char ruby_release_date[] = RUBY_RELEASE_DATE;
const char ruby_platform[] = RUBY_PLATFORM;
+const int ruby_patchlevel = RUBY_PATCHLEVEL;
void
Init_version()
@@ -28,6 +29,7 @@ Init_version()
rb_define_global_const("RUBY_VERSION", v);
rb_define_global_const("RUBY_RELEASE_DATE", d);
rb_define_global_const("RUBY_PLATFORM", p);
+ rb_define_global_const("RUBY_PATCHLEVEL", INT2FIX(RUBY_PATCHLEVEL));
/* obsolete constants */
rb_define_global_const("VERSION", v);
@@ -38,7 +40,7 @@ Init_version()
void
ruby_show_version()
{
- printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
+ printf("ruby %s (%s patchlevel %d) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PATCHLEVEL, RUBY_PLATFORM);
fflush(stdout);
}