ruby 1.8 doesn't have sort_by!

Closes Homebrew/homebrew#36935

Closes Homebrew/homebrew#36936.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-02-19 00:21:25 +08:00
parent ce956eda8e
commit 40087e30df

View File

@ -615,7 +615,7 @@ class Formula
} }
end end
hsh["installed"].sort_by! { |i| Version.new(i["version"]) } hsh["installed"] = hsh["installed"].sort_by { |i| Version.new(i["version"]) }
end end
hsh hsh