We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa4d4c6 commit c96b559Copy full SHA for c96b559
1 file changed
lib/pathname.rb
@@ -236,11 +236,11 @@ class Pathname
236
#
237
def initialize(path)
238
path = path.to_path if path.respond_to? :to_path
239
- @path = path.dup
240
-
241
- if /\0/.match?(@path)
242
- raise ArgumentError, "pathname contains \\0: #{@path.inspect}"
+ if /\0/.match?(path)
+ raise ArgumentError, "pathname contains \\0: #{path.inspect}"
243
end
+
+ @path = path.dup
244
245
246
def freeze() super; @path.freeze; self end
0 commit comments