From 5bab1304af25a843728dbcd2f3594913740aecb0 Mon Sep 17 00:00:00 2001 From: "Urabe, Shyouhei" Date: Tue, 14 May 2019 11:44:20 +0900 Subject: fix visibility of SecureRandom.gen_random Aliasing a method preserves its visibility. These aliases turn formerly-public methods into private. Should make them public again. [Bug #15847] --- test/test_securerandom.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/test_securerandom.rb b/test/test_securerandom.rb index 69d24c0417..1bc35f91f8 100644 --- a/test/test_securerandom.rb +++ b/test/test_securerandom.rb @@ -184,4 +184,11 @@ end assert_equal(idx, @it.send(:gen_random_openssl, idx).size) end end + + def test_repeated_gen_random + assert_nothing_raised NoMethodError, '[ruby-core:92633] [Bug #15847]' do + @it.gen_random(1) + @it.gen_random(1) + end + end end -- cgit v1.2.3