Skip to content

Commit

Permalink
Bump vendored securerandom to 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Dec 18, 2024
1 parent b9ad8fa commit 559e9fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion lib/bundler/vendor/securerandom/lib/securerandom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
module Bundler::SecureRandom

# The version
VERSION = "0.4.0"
VERSION = "0.4.1"

class << self
# Returns a random binary string containing +size+ bytes.
Expand All @@ -51,6 +51,12 @@ def bytes(n)
return gen_random(n)
end

# Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2
def alphanumeric(n = nil, chars: ALPHANUMERIC)
n = 16 if n.nil?
choose(chars, n)
end if RUBY_VERSION < '3.3'

private

# :stopdoc:
Expand Down
8 changes: 7 additions & 1 deletion lib/rubygems/vendor/securerandom/lib/securerandom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
module Gem::SecureRandom

# The version
VERSION = "0.4.0"
VERSION = "0.4.1"

class << self
# Returns a random binary string containing +size+ bytes.
Expand All @@ -51,6 +51,12 @@ def bytes(n)
return gen_random(n)
end

# Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2
def alphanumeric(n = nil, chars: ALPHANUMERIC)
n = 16 if n.nil?
choose(chars, n)
end if RUBY_VERSION < '3.3'

private

# :stopdoc:
Expand Down
2 changes: 1 addition & 1 deletion tool/bundler/vendor_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
gem "optparse", "0.6.0"
gem "pub_grub", github: "jhawthorn/pub_grub"
gem "resolv", "0.6.0"
gem "securerandom", "0.4.0"
gem "securerandom", "0.4.1"
gem "timeout", "0.4.3"
gem "thor", "1.3.2"
gem "tsort", "0.2.0"
Expand Down

0 comments on commit 559e9fe

Please sign in to comment.