ruby/lib/bundler/vendored_securerandom.rb
2024-12-13 11:24:08 +09:00

12 lines
387 B
Ruby

# frozen_string_literal: true
# Use RubyGems vendored copy when available. Otherwise fallback to Bundler
# vendored copy. The vendored copy in Bundler can be removed once support for
# RubyGems 3.5.18 is dropped.
begin
require "rubygems/vendored_securerandom"
rescue LoadError
require_relative "vendor/securerandom/lib/securerandom"
Gem::SecureRandom = Bundler::SecureRandom
end