From b79bd8407fad327d1a97056b2c19fb5a5bcb0f30 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 11 Mar 2021 17:34:05 -0600 Subject: [PATCH] Remove `FalseClass#to_i` core extension. Remove a monkey patch that added a `to_i` method to `FalseClass` so that `false.to_i` returned 0. This is legacy code that shouldn't still be in use anywhere. It doesn't really work anyway, because `true.to_i` isn't defined. --- config/initializers/core_extensions.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/initializers/core_extensions.rb b/config/initializers/core_extensions.rb index 7b8b87249..56b86e2a4 100644 --- a/config/initializers/core_extensions.rb +++ b/config/initializers/core_extensions.rb @@ -62,9 +62,3 @@ end class String include Danbooru::Extensions::String end - -class FalseClass - def to_i - 0 - end -end