summaryrefslogtreecommitdiff
path: root/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'version.c')
-rw-r--r--version.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/version.c b/version.c
index 57039d5cfe7..42d2ef84ca1 100644
--- a/version.c
+++ b/version.c
@@ -35,7 +35,12 @@ Init_version()
void
ruby_show_version()
{
+#if RUBY_VERSION_CODE < 140
+ printf("ruby %s-%d [%s]\n", RUBY_VERSION, RUBY_RELEASE_CODE % 1000000,
+ RUBY_PLATFORM);
+#else
printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
+#endif
}
void