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

Rename File.real_path to .realpath #12544

Closed
straight-shoota opened this issue Sep 29, 2022 · 1 comment · Fixed by #12552
Closed

Rename File.real_path to .realpath #12544

straight-shoota opened this issue Sep 29, 2022 · 1 comment · Fixed by #12552

Comments

@straight-shoota
Copy link
Member

The spelling is almost everywhere without an underscore:

  • CLI util: realpath
  • LibC function: realpath
  • no other method on File with similar name uses an underscore: basename, dirname, tempfile etc. (expand_path is a combination of verb and subject)
  • even in Ruby (which the file API is based on): File.realpath
  • and dozens of other file APIs: realpath

So it's pretty clear that the spelling real_path is an odd incidence. I regularly misspell it.

I'd like to rename the method to File.realpath because it just makes most sense.

@asterite
Copy link
Member

Yeah, I think we tried to "fix" this compared to Ruby, but Ruby was right 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants