You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Ruby 1.9 the encoding argument to Regexp.compile has been ignored
and has been removed since. Starting Ruby 3.2 there is a new third
positional argument for the timeout.
This PR deprecates the old method with encoding and stops passing the
argument, making it a dead parameter.
Copy file name to clipboardexpand all lines: lib/puppet/functions/regsubst.rb
+11-14
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,10 @@
20
20
# - *M* Multiline regexps
21
21
# - *G* Global replacement; all occurrences of the regexp in each target string will be replaced. Without this, only the first occurrence will be replaced.
22
22
# @param encoding [Enum['N','E','S','U']]
23
-
# Optional. How to handle multibyte characters when compiling the regexp (must not be used when pattern is a
24
-
# precompiled regexp). A single-character string with the following values:
25
-
# - *N* None
26
-
# - *E* EUC
27
-
# - *S* SJIS
28
-
# - *U* UTF-8
23
+
# Deprecated and ignored parameter, only here for compatibility.
29
24
# @return [Array[String], String] The result of the substitution. Result type is the same as for the target parameter.
25
+
# @deprecated
26
+
# This method has the optional encoding parameter, which is ignored.
30
27
# @example Get the third octet from the node's IP address:
# - *G* Global replacement; all occurrences of the regexp in each target string will be replaced. Without this, only the first occurrence will be replaced.
59
-
# @param encoding [Enum['N','E','S','U']]
60
-
# Optional. How to handle multibyte characters when compiling the regexp (must not be used when pattern is a
61
-
# precompiled regexp). A single-character string with the following values:
62
-
# - *N* None
63
-
# - *E* EUC
64
-
# - *S* SJIS
65
-
# - *U* UTF-8
66
56
# @return [Array[String], String] The result of the substitution. Result type is the same as for the target parameter.
67
57
# @example Put angle brackets around each octet in the node's IP address:
0 commit comments