[前][次][番号順一覧][スレッド一覧]

ruby-changes:65102

From: Masataka <ko1@a...>
Date: Mon, 1 Feb 2021 14:02:03 +0900 (JST)
Subject: [ruby-changes:65102] 23a833ee67 (master): Add File.absolute_path? to NEWS-2.7.0 [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=23a833ee67

From 23a833ee67dcc2d285082103deb79741ed147961 Mon Sep 17 00:00:00 2001
From: Masataka Pocke Kuwabara <kuwabara@p...>
Date: Mon, 1 Feb 2021 14:01:47 +0900
Subject: 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@r...>
---
 doc/NEWS-2.7.0 | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/doc/NEWS-2.7.0 b/doc/NEWS-2.7.0
index 3e6b98c..184b47f 100644
--- a/doc/NEWS-2.7.0
+++ b/doc/NEWS-2.7.0
@@ -366,6 +366,15 @@ See also Warning in {Core classes updates}[#label-Core+classes+updates+-28outsta https://github.com/ruby/ruby/blob/trunk/doc/NEWS-2.7.0#L366
 
 [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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]