summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPiotr Usewicz <[email protected]>2020-04-22 10:45:50 +0200
committerTom Black <[email protected]>2021-02-13 18:03:07 -0600
commit95676d30fccfacc0215edd9820a45c094d9edfc8 (patch)
tree9b0939450bd814a1c4c7e5d813e3b3d6a9300180
parent390641ed0ee96afdcc510f18e7ef21454a4f2308 (diff)
downloadruby2d-95676d30fccfacc0215edd9820a45c094d9edfc8.tar.gz
ruby2d-95676d30fccfacc0215edd9820a45c094d9edfc8.zip
Execute uname once
-rw-r--r--lib/ruby2d/font.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ruby2d/font.rb b/lib/ruby2d/font.rb
index 08f6b17..d83b315 100644
--- a/lib/ruby2d/font.rb
+++ b/lib/ruby2d/font.rb
@@ -63,11 +63,12 @@ module Ruby2D
end
# If MRuby
else
- if `uname`.include? 'Darwin' # macOS
+ uname = `uname`
+ if uname.include? 'Darwin' # macOS
macos_font_path
- elsif `uname`.include? 'Linux'
+ elsif uname.include? 'Linux'
linux_font_path
- elsif `uname`.include? 'MINGW'
+ elsif uname.include? 'MINGW'
windows_font_path
end
end