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
This commit is contained in:
parent
8b9db31f94
commit
119960dc56
@ -1,3 +1,8 @@
|
|||||||
|
Wed Apr 8 17:45:02 2015 Shannon Skipper <shannonskipper@gmail.com>
|
||||||
|
|
||||||
|
* version.c (Init_version): the version of the engine or
|
||||||
|
interpreter. [Fix GH-858]
|
||||||
|
|
||||||
Wed Apr 8 16:15:30 2015 Kenta Murata <mrkn@cookpad.com>
|
Wed Apr 8 16:15:30 2015 Kenta Murata <mrkn@cookpad.com>
|
||||||
|
|
||||||
* bigdecimal: conform to ruby's license. [ruby-core:68466] [Bug #10952]
|
* bigdecimal: conform to ruby's license. [ruby-core:68466] [Bug #10952]
|
||||||
|
@ -38,10 +38,11 @@ VALUE ruby_engine_name = Qnil;
|
|||||||
void
|
void
|
||||||
Init_version(void)
|
Init_version(void)
|
||||||
{
|
{
|
||||||
|
VALUE v = MKSTR(version);
|
||||||
/*
|
/*
|
||||||
* The running version of ruby
|
* 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
|
* The date this ruby was released
|
||||||
*/
|
*/
|
||||||
@ -71,6 +72,10 @@ Init_version(void)
|
|||||||
* The engine or interpreter this ruby uses.
|
* The engine or interpreter this ruby uses.
|
||||||
*/
|
*/
|
||||||
rb_define_global_const("RUBY_ENGINE", ruby_engine_name = MKSTR(engine));
|
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. */
|
/*! Prints the version information of the CRuby interpreter to stdout. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user