lib/beaker/platform.rb in beaker-5.5.0 vs lib/beaker/platform.rb in beaker-5.6.0
- old
+ new
@@ -115,12 +115,10 @@
# Returns the platform string with the platform version as a codename. If no conversion is
# necessary then the original, unchanged platform String is returned.
# @example Platform.new('debian-7-xxx').with_version_codename == 'debian-wheezy-xxx'
# @return [String] the platform string with the platform version represented as a codename
def with_version_codename
- version_array = [@variant, @version, @arch]
- version_array = [@variant, @codename, @arch] if @codename
- return version_array.join('-')
+ [@variant, @codename || @version, @arch].join('-')
end
# Returns the platform string with the platform version as a number. If no conversion is necessary
# then the original, unchanged platform String is returned.
# @example Platform.new('debian-wheezy-xxx').with_version_number == 'debian-7-xxx'