don't use in-place gsub, it breaks on 1.9.2 since the string was a hash key at one point and apparently gets frozen, fixes #4128
git-svn-id: file:///home/svn/framework3/trunk@12308 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
05e47166a3
commit
361922c634
|
@ -699,7 +699,9 @@ class Host < ActiveRecord::Base
|
|||
best_match[:os_flavor] ||= ""
|
||||
if best_match[:os_name]
|
||||
# Handle cases where the flavor contains the base name
|
||||
best_match[:os_flavor].gsub!(best_match[:os_name], '')
|
||||
# Don't use gsub!() here because the string was a hash key in a
|
||||
# previously life and gets frozen on 1.9.1, see #4128
|
||||
best_match[:os_flavor] = best_match[:os_flavor].gsub(best_match[:os_name], '')
|
||||
end
|
||||
|
||||
best_match[:os_name] ||= 'Unknown'
|
||||
|
|
Loading…
Reference in New Issue