diff --git a/lib/securerandom.rb b/lib/securerandom.rb index 0bcd2b6af0..442a71177d 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -53,13 +53,9 @@ module SecureRandom # Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2 def alphanumeric(n = nil, chars: ALPHANUMERIC) - if RUBY_VERSION < '3.3' - n = 16 if n.nil? - choose(chars, n) - else - super n, chars: chars - end - end + n = 16 if n.nil? + choose(chars, n) + end if RUBY_VERSION < '3.3' private