mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add File.absolute_path? to NEWS-2.7.0 [ci skip]
`File.absolute_path?` has been added since Ruby 2.7.0, but it isn't mentioned in the NEWS. So this patch adds a NEWS entry. ref: https://bugs.ruby-lang.org/issues/15868 Co-authored-by: nagachika <nagachika@ruby-lang.org>
This commit is contained in:
parent
e4ef579126
commit
23a833ee67
Notes:
git
2021-02-01 14:02:11 +09:00
Merged: https://github.com/ruby/ruby/pull/4139 Merged-By: nobu <nobu@ruby-lang.org>
1 changed files with 9 additions and 0 deletions
|
@ -366,6 +366,15 @@ See also Warning in {Core classes updates}[#label-Core+classes+updates+-28outsta
|
|||
|
||||
[File]
|
||||
|
||||
[New method]
|
||||
|
||||
* Added File.absolute_path? to check whether a path is absolute or
|
||||
not in a portable way. [Feature #15868]
|
||||
|
||||
File.absolute_path?("/foo") # => true (on *nix)
|
||||
File.absolute_path?("C:/foo") # => true (on Windows)
|
||||
File.absolute_path?("foo") # => false
|
||||
|
||||
[Modified method]
|
||||
|
||||
* File.extname now returns a dot string for names ending with a dot on
|
||||
|
|
Loading…
Reference in a new issue