From c8f2080137d250ba3ccf46bd3f81a40dac66a145 Mon Sep 17 00:00:00 2001 From: Matthew LeVan Date: Thu, 21 Nov 2024 21:36:48 -0500 Subject: [PATCH] Remove unnecessary `patp2bn` --- lib/aura/p.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/aura/p.rb b/lib/aura/p.rb index c1b83d7..7c3604d 100644 --- a/lib/aura/p.rb +++ b/lib/aura/p.rb @@ -28,19 +28,15 @@ def self.patp2hex(name) hex.length.odd? ? "0x#{hex.rjust(hex.length + 1, "0")}" : "0x#{hex}" end - def self.patp2bn(name) - "0x#{patp2hex(name)}".to_i(16) - end - def self.patp2dec(name) - patp2bn(name).to_s + patp2hex(name).to_i(16) rescue ArgumentError raise "patp2dec: not a valid @p" end def self.clan(who) begin - name = patp2bn(who) + name = patp2hex(who) rescue ArgumentError raise "clan: not a valid @p" end @@ -57,7 +53,7 @@ def self.clan(who) def self.sein(name) begin - who = patp2bn(name) + who = patp2hex(name) mir = clan(name) rescue ArgumentError raise "sein: not a valid @p"