We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f582dc commit 60f5d58Copy full SHA for 60f5d58
1 file changed
lib/pathname_builtin.rb
@@ -201,6 +201,8 @@ class Pathname
201
else
202
proc {|a, b| a == b}
203
end
204
+ SAME_PATHS.freeze
205
+ private_constant :SAME_PATHS
206
207
attr_reader :path
208
protected :path
@@ -307,13 +309,17 @@ def sub_ext(repl)
307
309
SEPARATOR_LIST = Regexp.quote File::SEPARATOR
308
310
SEPARATOR_PAT = /#{SEPARATOR_LIST}/
311
312
+ SEPARATOR_LIST.freeze
313
+ SEPARATOR_PAT.freeze
314
+ private_constant :SEPARATOR_LIST, :SEPARATOR_LIST
315
316
if File.dirname('A:') == 'A:.' # DOSish drive letter
317
# Regexp that matches an absolute path.
318
ABSOLUTE_PATH = /\A(?:[A-Za-z]:|#{SEPARATOR_PAT})/
319
320
ABSOLUTE_PATH = /\A#{SEPARATOR_PAT}/
321
322
+ ABSOLUTE_PATH.freeze
323
private_constant :ABSOLUTE_PATH
324
325
# :startdoc:
0 commit comments