From 119960dc56f0892951063a811276927dd60c74e4 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 8 Apr 2015 08:45:05 +0000 Subject: version.c: support RUBY_ENGINE_VERSION * version.c (Init_version): the version of the engine or interpreter. [Fix GH-858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- version.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'version.c') diff --git a/version.c b/version.c index 45761b3251..f3c687dedb 100644 --- a/version.c +++ b/version.c @@ -38,10 +38,11 @@ VALUE ruby_engine_name = Qnil; void Init_version(void) { + VALUE v = MKSTR(version); /* * The running version of ruby */ - rb_define_global_const("RUBY_VERSION", MKSTR(version)); + rb_define_global_const("RUBY_VERSION", v); /* * The date this ruby was released */ @@ -71,6 +72,10 @@ Init_version(void) * The engine or interpreter this ruby uses. */ rb_define_global_const("RUBY_ENGINE", ruby_engine_name = MKSTR(engine)); + /* + * The version of the engine or interpreter this ruby uses. + */ + rb_define_global_const("RUBY_ENGINE_VERSION", v); } /*! Prints the version information of the CRuby interpreter to stdout. */ -- cgit v1.2.1