From 1e2f2e68286ce018c57945ab3cdcbaaf484377ee Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 9 Apr 2025 20:28:28 +0900 Subject: feat(blog/content): convert from .ndoc to .dj --- .../ruby-detect-running-implementation.ndoc | 119 --------------------- 1 file changed, 119 deletions(-) delete mode 100644 vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.ndoc (limited to 'vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.ndoc') diff --git a/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.ndoc b/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.ndoc deleted file mode 100644 index af02fde4..00000000 --- a/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.ndoc +++ /dev/null @@ -1,119 +0,0 @@ ---- -[article] -uuid = "e1456a50-4fc6-42ef-89f3-8be78e01da13" -title = "【Ruby】 自身を実行している処理系の種類を判定する" -description = "Ruby には複数の実装があるが、自身を実行している処理系の種類をスクリプト上からどのように判定すればよいだろうか。" -tags = [ - "ruby", -] - -[[article.revisions]] -date = "2021-10-02" -remark = "Qiita から移植" ---- -
- - この記事は Qiita から移植してきたものです。 - 元 URL: https://qiita.com/nsfisis/items/74d7ffeeebc51b20d791 - -

- Ruby - という言語には複数の実装があるが、それらをスクリプト上からどのようにして - programmatically に見分ければよいだろうか。 -

-

- Object クラスに定義されている RUBY_ENGINE - という定数がこの用途に使える。 -

-

- 参考: - Object::RUBY_ENGINE -

-

- 上記ページの例から引用する: -

- - - -

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

-

- What values for RUBY_ENGINE - correspond to which Ruby implementations? より引用: -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RUBY_ENGINEImplementation
<undefined>MRI < 1.9
`ruby'MRI >= 1.9 or REE
`jruby'JRuby
`macruby'MacRuby
`rbx'Rubinius
`maglev'MagLev
`ironruby'IronRuby
`cardinal'Cardinal
-
-

- なお、この質問・回答は - 2014年になされたものであり、値は変わっている可能性がある。MRI (aka - CRuby) については執筆時現在 (2020/12/8) も 'ruby' - が返ってくることを確認済み。 -

-

- この表にない主要な処理系として、mruby'mruby' - を返す。 -

-

- mruby - 該当部分のソース より引用: -

- - - -
-- cgit v1.2.3-70-g09d2