Here we want end of string, no optional newlines are to
be expected, so \z is more concise.
This commit is contained in:
Xavier Noria 2020-03-04 18:16:30 +01:00
parent 09b15145d6
commit fcc8c6868c
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class Module
if defined?(@parent_name)
@parent_name
else
parent_name = name =~ /::[^:]+\Z/ ? -$` : nil
parent_name = name =~ /::[^:]+\z/ ? -$` : nil
@parent_name = parent_name unless frozen?
parent_name
end