Use ruby language constants to build version string in software version dimension (#30309)
This commit is contained in:
		@@ -25,14 +25,11 @@ class Admin::Metrics::Dimension::SoftwareVersionsDimension < Admin::Metrics::Dim
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def ruby_version
 | 
					  def ruby_version
 | 
				
			||||||
    yjit = defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
 | 
					 | 
				
			||||||
    value = "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}#{yjit ? ' +YJIT' : ''}"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      key: 'ruby',
 | 
					      key: 'ruby',
 | 
				
			||||||
      human_key: 'Ruby',
 | 
					      human_key: 'Ruby',
 | 
				
			||||||
      value: value,
 | 
					      value: "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}",
 | 
				
			||||||
      human_value: value,
 | 
					      human_value: RUBY_DESCRIPTION,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user