Skip to content

Commit

Permalink
Support Enumerable as argument to File.join (#12102)
Browse files Browse the repository at this point in the history
  • Loading branch information
caspiano authored Jun 9, 2022
1 parent afcccea commit 7d46284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/file.cr
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ class File < IO::FileDescriptor
# File.join({"foo/", "/bar/", "/baz"}) # => "foo/bar/baz"
# File.join(["/foo/", "/bar/", "/baz/"]) # => "/foo/bar/baz/"
# ```
def self.join(parts : Array | Tuple) : String
def self.join(parts : Enumerable) : String
Path.new(parts).to_s
end

Expand Down

0 comments on commit 7d46284

Please sign in to comment.