aboutsummaryrefslogtreecommitdiffstats
path: root/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'version.c')
-rw-r--r--version.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/version.c b/version.c
index e8dd4c7f46..7297189276 100644
--- a/version.c
+++ b/version.c
@@ -38,11 +38,11 @@ VALUE ruby_engine_name = Qnil;
void
Init_version(void)
{
- VALUE v = MKSTR(version);
+ VALUE version;
/*
* The running version of ruby
*/
- rb_define_global_const("RUBY_VERSION", v);
+ rb_define_global_const("RUBY_VERSION", (version = MKSTR(version)));
/*
* The date this ruby was released
*/
@@ -75,7 +75,7 @@ Init_version(void)
/*
* The version of the engine or interpreter this ruby uses.
*/
- rb_define_global_const("RUBY_ENGINE_VERSION", v);
+ rb_define_global_const("RUBY_ENGINE_VERSION", (1 ? version : MKSTR(version)));
}
/*! Prints the version information of the CRuby interpreter to stdout. */