[前][次][番号順一覧][スレッド一覧]

ruby-changes:38105

From: nobu <ko1@a...>
Date: Wed, 8 Apr 2015 17:45:21 +0900 (JST)
Subject: [ruby-changes:38105] nobu:r50186 (trunk): version.c: support RUBY_ENGINE_VERSION

nobu	2015-04-08 17:45:05 +0900 (Wed, 08 Apr 2015)

  New Revision: 50186

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50186

  Log:
    version.c: support RUBY_ENGINE_VERSION
    
    * version.c (Init_version): the version of the engine or
      interpreter.  [Fix GH-858]

  Modified files:
    trunk/ChangeLog
    trunk/version.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50185)
+++ ChangeLog	(revision 50186)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Apr  8 17:45:02 2015  Shannon Skipper  <shannonskipper@g...>
+
+	* version.c (Init_version): the version of the engine or
+	  interpreter.  [Fix GH-858]
+
 Wed Apr  8 16:15:30 2015  Kenta Murata  <mrkn@c...>
 
 	* bigdecimal: conform to ruby's license.  [ruby-core:68466] [Bug #10952]
Index: version.c
===================================================================
--- version.c	(revision 50185)
+++ version.c	(revision 50186)
@@ -38,10 +38,11 @@ VALUE ruby_engine_name = Qnil; https://github.com/ruby/ruby/blob/trunk/version.c#L38
 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) https://github.com/ruby/ruby/blob/trunk/version.c#L72
      * 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. */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]