diff options
Diffstat (limited to 'spec/mspec/lib/mspec/utils/ruby_name.rb')
-rw-r--r-- | spec/mspec/lib/mspec/utils/ruby_name.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/mspec/lib/mspec/utils/ruby_name.rb b/spec/mspec/lib/mspec/utils/ruby_name.rb new file mode 100644 index 0000000000..e381e387f6 --- /dev/null +++ b/spec/mspec/lib/mspec/utils/ruby_name.rb @@ -0,0 +1,8 @@ +unless Object.const_defined?(:RUBY_NAME) and RUBY_NAME + if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE + RUBY_NAME = RUBY_ENGINE + else + require 'rbconfig' + RUBY_NAME = RbConfig::CONFIG["RUBY_INSTALL_NAME"] || RbConfig::CONFIG["ruby_install_name"] + end +end |