From c9ee1437c0a12bea5fbafb7efbb8e87e4eb6fe0e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 16 May 2024 03:43:35 -0400 Subject: [PATCH] Use ruby language constants to build version string in software version dimension (#30309) --- .../admin/metrics/dimension/software_versions_dimension.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/lib/admin/metrics/dimension/software_versions_dimension.rb b/app/lib/admin/metrics/dimension/software_versions_dimension.rb index ccf556eae..97cdaf589 100644 --- a/app/lib/admin/metrics/dimension/software_versions_dimension.rb +++ b/app/lib/admin/metrics/dimension/software_versions_dimension.rb @@ -25,14 +25,11 @@ class Admin::Metrics::Dimension::SoftwareVersionsDimension < Admin::Metrics::Dim end def ruby_version - yjit = defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled? - value = "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}#{yjit ? ' +YJIT' : ''}" - { key: 'ruby', human_key: 'Ruby', - value: value, - human_value: value, + value: "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}", + human_value: RUBY_DESCRIPTION, } end