We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4482ed2 + 4fdd4c3 commit a9c0577Copy full SHA for a9c0577
stdlib/securerandom/0/securerandom.rbs
@@ -35,5 +35,15 @@
35
# raised.
36
#
37
module SecureRandom
38
+ # <!--
39
+ # rdoc-file=lib/securerandom.rb
40
+ # - bytes(n)
41
+ # -->
42
+ # Returns a random binary string containing `size` bytes.
43
+ #
44
+ # See Random.bytes
45
46
+ def self.bytes: (Integer) -> String
47
+
48
extend Random::Formatter
49
end
test/stdlib/SecureRandom_test.rb
@@ -7,6 +7,11 @@ class SecureRandomSingletonTest < Test::Unit::TestCase
7
library "securerandom"
8
testing "singleton(::SecureRandom)"
9
10
+ def test_bytes
11
+ assert_send_type "(::Integer) -> ::String",
12
+ SecureRandom, :bytes, 10
13
+ end
14
15
def test_uuid
16
assert_send_type "() -> ::String",
17
SecureRandom, :uuid
0 commit comments