• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mrubyを超漢字で動作させる


Commit MetaInfo

修訂e2e23c66d2d740a2f5ab45427836bdb8115e36df (tree)
時間2015-11-17 08:13:31
作者cremno <cremno@mail...>
Commitercremno

Log Message

add RUBY_ENGINE_VERSION

RUBY_ENGINE_VERSION is equivalent to MRUBY_VERSION. It would be a
standard way to get the interpreter version (without a case expression).

It's also already defined by CRuby 2.3, JRuby 9000, Opal, and Rubinius.

Change Summary

差異

--- a/src/version.c
+++ b/src/version.c
@@ -4,8 +4,11 @@
44 void
55 mrb_init_version(mrb_state* mrb)
66 {
7+ mrb_value mruby_version = mrb_str_new_lit(mrb, MRUBY_VERSION);
8+
79 mrb_define_global_const(mrb, "RUBY_VERSION", mrb_str_new_lit(mrb, MRUBY_RUBY_VERSION));
810 mrb_define_global_const(mrb, "RUBY_ENGINE", mrb_str_new_lit(mrb, MRUBY_RUBY_ENGINE));
11+ mrb_define_global_const(mrb, "RUBY_ENGINE_VERSION", mruby_version);
912 mrb_define_global_const(mrb, "MRUBY_VERSION", mrb_str_new_lit(mrb, MRUBY_VERSION));
1013 mrb_define_global_const(mrb, "MRUBY_RELEASE_NO", mrb_fixnum_value(MRUBY_RELEASE_NO));
1114 mrb_define_global_const(mrb, "MRUBY_RELEASE_DATE", mrb_str_new_lit(mrb, MRUBY_RELEASE_DATE));