From c5634371dcd1e49501989f3c713f1fd1f76c572e Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 10 Jun 2015 02:06:28 +0000 Subject: fake.rb.in: accurate fake * template/fake.rb.in: turn into erb template from autoconf template to fake more accurately. * common.mk (fake.rb): needs preprocessed file now. * version.c (Init_version): add dummy expression to RUBY_ENGINE_VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- version.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'version.c') 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. */ -- cgit v1.2.3