From 2b42f259552dd3f443a1393eb8b47e8dc9ee80f2 Mon Sep 17 00:00:00 2001 From: Paul Kmiec Date: Mon, 15 May 2023 23:26:13 -0700 Subject: Booleanize as string instead of 0 / 1 only to call to_s The `booleanize` method is always used to pipe values to str, so it is safe to return the boolean values as strings. --- lib/axlsx.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/axlsx.rb b/lib/axlsx.rb index 776ff918..656db8aa 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -171,8 +171,7 @@ module Axlsx # @return [Object] def self.booleanize(value) if value == true || value == false - # value ? '1' : '0' - value ? 1 : 0 + value ? '1' : '0' else value end -- cgit v1.2.3