File use-build-specific-ruby-version.diff of Package rubygem-ohai-6

--- lib/ohai/plugins/ruby.rb
+++ lib/ohai/plugins/ruby.rb
@@ -22,7 +22,8 @@
 
 
 def run_ruby(command)
-  cmd = "ruby -e \"require 'rbconfig'; #{command}\""
+  rb_exe = File.join(::RbConfig::CONFIG['bindir'], ::RbConfig::CONFIG['ruby_install_name'])
+  cmd = "#{rb_exe} -e \"require 'rbconfig'; #{command}\""
   status, stdout, stderr = run_command(:no_status_check => true, :command => cmd)
   stdout.strip
 end
openSUSE Build Service is sponsored by