From 4681e861efcdf9b0b73e3803e70712bc55162863 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 8 Aug 2026 10:38:18 +0900 Subject: feat(slides): improve slide controller --- .../ruby-detect-running-implementation/index.html | 45 ++++++++++++---------- 1 file changed, 24 insertions(+), 21 deletions(-) (limited to 'services/nuldoc/public/blog/posts/2021-10-02/ruby-detect-running-implementation/index.html') diff --git a/services/nuldoc/public/blog/posts/2021-10-02/ruby-detect-running-implementation/index.html b/services/nuldoc/public/blog/posts/2021-10-02/ruby-detect-running-implementation/index.html index 0dfc31fd..c2083d44 100644 --- a/services/nuldoc/public/blog/posts/2021-10-02/ruby-detect-running-implementation/index.html +++ b/services/nuldoc/public/blog/posts/2021-10-02/ruby-detect-running-implementation/index.html @@ -15,7 +15,7 @@ 【Ruby】 自身を実行している処理系の種類を判定する|REPL: Rest-Eat-Program Loop - +
@@ -81,12 +81,13 @@ 上記ページの例から引用する:

-
$ ruby-1.9.1 -ve 'p RUBY_ENGINE' -
ruby 1.9.1p0 (2009-03-04 revision 22762) [x86_64-linux] -
"ruby" -
$ jruby -ve 'p RUBY_ENGINE' -
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [i386-java] -
"jruby"
+
$ ruby-1.9.1 -ve 'p RUBY_ENGINE'
+ruby 1.9.1p0 (2009-03-04 revision 22762) [x86_64-linux]
+"ruby"
+$ jruby -ve 'p RUBY_ENGINE'
+jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [i386-java]
+"jruby"
+

それぞれの処理系がどのような値を返すかだが、stack overflow に良い質問と回答があった。 @@ -96,16 +97,17 @@

-
| RUBY_ENGINE | Implementation | -
|:-----------:|:------------------| -
| <undefined> | MRI < 1.9 | -
| 'ruby' | MRI >= 1.9 or REE | -
| 'jruby' | JRuby | -
| 'macruby' | MacRuby | -
| 'rbx' | Rubinius | -
| 'maglev' | MagLev | -
| 'ironruby' | IronRuby | -
| 'cardinal' | Cardinal |
+
| RUBY_ENGINE | Implementation    |
+|:-----------:|:------------------|
+| <undefined> | MRI < 1.9         |
+| 'ruby'      | MRI >= 1.9 or REE |
+| 'jruby'     | JRuby             |
+| 'macruby'   | MacRuby           |
+| 'rbx'       | Rubinius          |
+| 'maglev'    | MagLev            |
+| 'ironruby'  | IronRuby          |
+| 'cardinal'  | Cardinal          |
+

@@ -121,10 +123,11 @@

version.h
-
/* -
* Ruby engine. -
*/ -
#define MRUBY_RUBY_ENGINE "mruby"
+
/*
+ * Ruby engine.
+ */
+#define MRUBY_RUBY_ENGINE  "mruby"
+
-- cgit v1.3.1