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
As far as I can tell, Regexp.compile has never accepted a third
parameter to Regexp.compile until Ruby 3.2. There it actually is a
timeout parameter. In older versions it was discarded as an invalid
input. It's unclear to me if this parameter ever worked in the first
place.
This PR attemps to still make it work as it was originally intended, but
it's unclear what the original goal even was.
Copy file name to clipboardExpand all lines: lib/puppet/functions/regsubst.rb
+3-5
Original file line number
Diff line number
Diff line change
@@ -56,13 +56,10 @@
56
56
# - *I* Ignore case in regexps
57
57
# - *M* Multiline regexps
58
58
# - *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']]
59
+
# @param encoding [Optional[Enum['N']]
60
60
# Optional. How to handle multibyte characters when compiling the regexp (must not be used when pattern is a
61
61
# precompiled regexp). A single-character string with the following values:
62
62
# - *N* None
63
-
# - *E* EUC
64
-
# - *S* SJIS
65
-
# - *U* UTF-8
66
63
# @return [Array[String], String] The result of the substitution. Result type is the same as for the target parameter.
67
64
# @example Put angle brackets around each octet in the node's IP address:
0 commit comments