Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Path.new receiving Path as first argument #8753

Merged

Conversation

straight-shoota
Copy link
Member

Path.new(Path.new("")) did not work because of the way the constructors are defined. But this should work. Especially when using multiple arguments to join a path, the first component should be able to be a Path instance. After the first component this already worked because the splat argument is delegated to #join.

Copy link
Member

@bcardiff bcardiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am near to suggest some macro programming to handle all the cases.

@straight-shoota straight-shoota merged commit e9662d2 into crystal-lang:master Feb 8, 2020
@straight-shoota straight-shoota deleted the fix/path-new-path branch February 8, 2020 20:16
@straight-shoota straight-shoota added this to the 0.33.0 milestone Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants