From 5e5e134398bf0e4e3852cee828d0d7669d8625c0 Mon Sep 17 00:00:00 2001 From: Tadashi Saito Date: Tue, 8 Aug 2023 01:22:45 +0900 Subject: [PATCH] Remove redundant check. --- lib/int.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/int.rb b/lib/int.rb index e32c2c5..f993cf0 100644 --- a/lib/int.rb +++ b/lib/int.rb @@ -42,9 +42,7 @@ def self.error(error) end def coerce(other) - if other.kind_of?(self.class) - # do nothing - elsif scala?(other) + if scala?(other) other = new(*[other]*2) else raise "Unknown class #{other.class}: #{other}"