summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelogs/unreleased/46950-systemcheck-ruby-version.yml5
-rw-r--r--lib/system_check/app/ruby_version_check.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/46950-systemcheck-ruby-version.yml b/changelogs/unreleased/46950-systemcheck-ruby-version.yml
new file mode 100644
index 00000000000..e556e14223b
--- /dev/null
+++ b/changelogs/unreleased/46950-systemcheck-ruby-version.yml
@@ -0,0 +1,5 @@
+---
+title: 'SystemCheck: Use a more reliable way to detect current Ruby version'
+merge_request: 23291
+author:
+type: changed
diff --git a/lib/system_check/app/ruby_version_check.rb b/lib/system_check/app/ruby_version_check.rb
index d73c39f2c3f..60e07718338 100644
--- a/lib/system_check/app/ruby_version_check.rb
+++ b/lib/system_check/app/ruby_version_check.rb
@@ -11,7 +11,7 @@ module SystemCheck
end
def self.current_version
- @current_version ||= Gitlab::VersionInfo.parse(Gitlab::TaskHelpers.run_command(%w(ruby --version)))
+ @current_version ||= Gitlab::VersionInfo.parse(RUBY_VERSION)
end
def check?