From f1808cd66d0a1197679772c3cfe1457224fc6c21 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 3 Jun 2014 11:32:26 -0500 Subject: Don't coerce value to string unnecessarily --- Library/Homebrew/os/mac/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/os/mac/version.rb b/Library/Homebrew/os/mac/version.rb index e19ecae70..d40c94bcd 100644 --- a/Library/Homebrew/os/mac/version.rb +++ b/Library/Homebrew/os/mac/version.rb @@ -23,7 +23,7 @@ module OS def <=>(other) @comparison_cache.fetch(other) do - v = SYMBOLS.fetch(other, other.to_s) + v = SYMBOLS.fetch(other) { other.to_s } @comparison_cache[other] = super(Version.new(v)) end end -- cgit v1.2.3