Skip to content

Commit 9ff3e00

Browse files
committed
Update base64.rbs
1 parent c5d3c7f commit 9ff3e00

1 file changed

Lines changed: 27 additions & 23 deletions

File tree

sig/base64.rbs

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@
139139
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
140140
# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
141141
#
142-
# Method Base64.urlsafe_decode64 allows padding in `str`, which if present, must
143-
# be correct: see [Padding](Base64.html#module-Base64-label-Padding), above:
142+
# Method Base64.urlsafe_decode64 allows padding in the encoded string, which if
143+
# present, must be correct: see
144+
# [Padding](Base64.html#module-Base64-label-Padding), above:
144145
#
145146
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
146147
# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
@@ -182,21 +183,21 @@
182183
module Base64
183184
# <!--
184185
# rdoc-file=lib/base64.rb
185-
# - decode64(str)
186+
# - Base64.decode(encoded_string) -> decoded_string
186187
# -->
187188
# Returns a string containing the decoding of an RFC-2045-compliant
188-
# Base64-encoded string `str`:
189+
# Base64-encoded string `encoded_string`:
189190
#
190191
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
191192
# Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
192193
#
193-
# Non-Base64 characters in `str` are ignored; see [Encoding Character
194+
# Non-Base64 characters in `encoded_string` are ignored; see [Encoding Character
194195
# Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: these
195196
# include newline characters and characters `-` and `/`:
196197
#
197198
# Base64.decode64("\x00\n-_") # => ""
198199
#
199-
# Padding in `str` (even if incorrect) is ignored:
200+
# Padding in `encoded_string` (even if incorrect) is ignored:
200201
#
201202
# Base64.decode64("MDEyMzQ1Njc") # => "01234567"
202203
# Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
@@ -206,9 +207,10 @@ module Base64
206207

207208
# <!--
208209
# rdoc-file=lib/base64.rb
209-
# - encode64(bin)
210+
# - Base64.encode64(string) -> encoded_string
210211
# -->
211-
# Returns a string containing the RFC-2045-compliant Base64-encoding of `bin`.
212+
# Returns a string containing the RFC-2045-compliant Base64-encoding of
213+
# `string`.
212214
#
213215
# Per RFC 2045, the returned string may contain the URL-unsafe characters `+` or
214216
# `/`; see [Encoding Character
@@ -241,23 +243,23 @@ module Base64
241243

242244
# <!--
243245
# rdoc-file=lib/base64.rb
244-
# - strict_decode64(str)
246+
# - Base64.strict_decode64(encoded_string) -> decoded_string
245247
# -->
246248
# Returns a string containing the decoding of an RFC-2045-compliant
247-
# Base64-encoded string `str`:
249+
# Base64-encoded string `encoded_string`:
248250
#
249251
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
250252
# Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
251253
#
252-
# Non-Base64 characters in `str` not allowed; see [Encoding Character
253-
# Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above: these
254-
# include newline characters and characters `-` and `/`:
254+
# Non-Base64 characters in `encoded_string` are not allowed; see [Encoding
255+
# Character Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above:
256+
# these include newline characters and characters `-` and `/`:
255257
#
256258
# Base64.strict_decode64("\n") # Raises ArgumentError
257259
# Base64.strict_decode64('-') # Raises ArgumentError
258260
# Base64.strict_decode64('_') # Raises ArgumentError
259261
#
260-
# Padding in `str`, if present, must be correct:
262+
# Padding in `encoded_string`, if present, must be correct:
261263
#
262264
# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
263265
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
@@ -267,9 +269,10 @@ module Base64
267269

268270
# <!--
269271
# rdoc-file=lib/base64.rb
270-
# - strict_encode64(bin)
272+
# - Base64.strict_encode64(string) -> encoded_string
271273
# -->
272-
# Returns a string containing the RFC-2045-compliant Base64-encoding of `bin`.
274+
# Returns a string containing the RFC-2045-compliant Base64-encoding of
275+
# `string`.
273276
#
274277
# Per RFC 2045, the returned string may contain the URL-unsafe characters `+` or
275278
# `/`; see [Encoding Character
@@ -301,18 +304,19 @@ module Base64
301304

302305
# <!--
303306
# rdoc-file=lib/base64.rb
304-
# - urlsafe_decode64(str)
307+
# - Base64.urlsafe_decode64(encoded_string) -> decoded_string
305308
# -->
306-
# Returns the decoding of an RFC-4648-compliant Base64-encoded string `str`:
309+
# Returns the decoding of an RFC-4648-compliant Base64-encoded string
310+
# `encoded_string`:
307311
#
308-
# `str` may not contain non-Base64 characters; see [Encoding Character
309-
# Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above:
312+
# `encoded_string` may not contain non-Base64 characters; see [Encoding
313+
# Character Set](Base64.html#module-Base64-label-Encoding+Character+Sets) above:
310314
#
311315
# Base64.urlsafe_decode64('+') # Raises ArgumentError.
312316
# Base64.urlsafe_decode64('/') # Raises ArgumentError.
313317
# Base64.urlsafe_decode64("\n") # Raises ArgumentError.
314318
#
315-
# Padding in `str`, if present, must be correct: see
319+
# Padding in `encoded_string`, if present, must be correct: see
316320
# [Padding](Base64.html#module-Base64-label-Padding), above:
317321
#
318322
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
@@ -323,9 +327,9 @@ module Base64
323327

324328
# <!--
325329
# rdoc-file=lib/base64.rb
326-
# - urlsafe_encode64(bin, padding: true)
330+
# - Base64.urlsafe_encode64(string) -> encoded_string
327331
# -->
328-
# Returns the RFC-4648-compliant Base64-encoding of `bin`.
332+
# Returns the RFC-4648-compliant Base64-encoding of `string`.
329333
#
330334
# Per RFC 4648, the returned string will not contain the URL-unsafe characters
331335
# `+` or `/`, but instead may contain the URL-safe characters `-` and `_`; see

0 commit comments

Comments
 (0)