From 736dabb822f9f7c912cefda47aefcbde0fdee996 Mon Sep 17 00:00:00 2001 From: ksss Date: Thu, 28 May 2026 11:10:29 +0900 Subject: [PATCH] Revert Digest::Class method changes The original definition allows for flexible behavior in subclasses, but it can also lead to overlooking issues that should be discovered. If we want to increase the number of arguments in a subclass, we should write an overload in that class. ``` Digest::SHA256.base64digest("aaa", :bbb) #=> ArgumentError ``` ref: https://github.com/ruby/rbs/pull/2967 --- stdlib/digest/0/digest.rbs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stdlib/digest/0/digest.rbs b/stdlib/digest/0/digest.rbs index 4b92b65cf..e6f4ab7f9 100644 --- a/stdlib/digest/0/digest.rbs +++ b/stdlib/digest/0/digest.rbs @@ -319,7 +319,7 @@ class Digest::Class # Returns the base64 encoded hash value of a given *string*. The return value # is properly padded with '=' and contains no line feeds. # - def self.base64digest: (string str, *untyped args) -> String + def self.base64digest: (string str) -> String # # Returns the BubbleBabble encoded hash value of a given *string*. # - def self.bubblebabble: (string, *untyped) -> String + def self.bubblebabble: (string) -> String #