From 1a90dbd9a24441a94eb345feb78312c0b407a54c Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Thu, 15 Aug 2024 22:18:22 +0200 Subject: [PATCH] wiki: jekyll-ppi: Use map(&:to_i) Change-Id: Ie26371d43cc37f5b449b730aa4da5e5e684aceeb --- _plugins/jekyll-ppi.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_plugins/jekyll-ppi.rb b/_plugins/jekyll-ppi.rb index 724abbe966..c3d78e5782 100644 --- a/_plugins/jekyll-ppi.rb +++ b/_plugins/jekyll-ppi.rb @@ -1,8 +1,8 @@ module Jekyll module PPI def ppi(input, screen_size) - h, w = input.split("x") - ("%d" % (Math.sqrt((h.to_i ** 2) + (w.to_i ** 2)) / screen_size)) + h, w = input.split("x").map(&:to_i) + ("%d" % (Math.sqrt((h ** 2) + (w ** 2)) / screen_size)) end end end