Skip to content

Commit 559e9fe

Browse files
deivid-rodriguezhsbt
authored andcommitted
Bump vendored securerandom to 0.4.1
1 parent b9ad8fa commit 559e9fe

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

lib/bundler/vendor/securerandom/lib/securerandom.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
module Bundler::SecureRandom
4242

4343
# The version
44-
VERSION = "0.4.0"
44+
VERSION = "0.4.1"
4545

4646
class << self
4747
# Returns a random binary string containing +size+ bytes.
@@ -51,6 +51,12 @@ def bytes(n)
5151
return gen_random(n)
5252
end
5353

54+
# Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2
55+
def alphanumeric(n = nil, chars: ALPHANUMERIC)
56+
n = 16 if n.nil?
57+
choose(chars, n)
58+
end if RUBY_VERSION < '3.3'
59+
5460
private
5561

5662
# :stopdoc:

lib/rubygems/vendor/securerandom/lib/securerandom.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
module Gem::SecureRandom
4242

4343
# The version
44-
VERSION = "0.4.0"
44+
VERSION = "0.4.1"
4545

4646
class << self
4747
# Returns a random binary string containing +size+ bytes.
@@ -51,6 +51,12 @@ def bytes(n)
5151
return gen_random(n)
5252
end
5353

54+
# Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2
55+
def alphanumeric(n = nil, chars: ALPHANUMERIC)
56+
n = 16 if n.nil?
57+
choose(chars, n)
58+
end if RUBY_VERSION < '3.3'
59+
5460
private
5561

5662
# :stopdoc:

tool/bundler/vendor_gems.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
gem "optparse", "0.6.0"
1111
gem "pub_grub", github: "jhawthorn/pub_grub"
1212
gem "resolv", "0.6.0"
13-
gem "securerandom", "0.4.0"
13+
gem "securerandom", "0.4.1"
1414
gem "timeout", "0.4.3"
1515
gem "thor", "1.3.2"
1616
gem "tsort", "0.2.0"

0 commit comments

Comments
 (0)