mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
12 lines
387 B
Ruby
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
|