Project

General

Profile

Feature #13056

base option to Dir.glob

Added by nobu (Nobuyoshi Nakada) about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:78767]

Description

A proposal of base option to Dir.glob method.
https://github.com/ruby/ruby/compare/trunk...nobu:feature/Dir.glob-base

Related to [Feature #7360].


Related issues

Blocks Ruby trunk - Feature #7360: Adding Pathname#globClosed

Associated revisions

Revision 58858
Added by nobu (Nobuyoshi Nakada) 8 months ago

Dir.glob base option

  • dir.c (dir_s_aref, dir_s_glob): add new optional keyword argument, base. [Feature#13056]

Revision 58885
Added by stomar (Marcus Stollsteimer) 8 months ago

dir.c: document base keyword argument of Dir.glob

  • dir.c: [DOC] document the new base keyword argument of Dir.glob [Feature #13056]; also improve docs for Dir.glob and Dir[].

Revision 59476
Added by nobu (Nobuyoshi Nakada) 6 months ago

dir.c: relax base option

  • dir.c (dir_glob_options): relax base option. ignore when nil or an empty string as :base option. [Feature #13056]

Revision 59479
Added by nobu (Nobuyoshi Nakada) 6 months ago

dir.c: relative path Dir base

  • dir.c (glob_helper): fix globbing based on a relative path Dir. [Feature #13056]

Revision 61754
Added by normal 9 days ago

dir.c: pass flags to openat(2) correctly

Flags are 3rd argument of openat(2) while the 4th argument
(mode_t) is unnecessary for our uses. This bug exists since
Ruby 2.5 from r58860 and was discoverd by strace.

  • dir.c (nogvl_opendir_at): use openat correctly [Feature #13056] [Feature #14346]

History

#1 Updated by nobu (Nobuyoshi Nakada) about 1 year ago

#2 [ruby-core:81273] Updated by matz (Yukihiro Matsumoto) 8 months ago

Looks good to me.

Matz.

#3 Updated by nobu (Nobuyoshi Nakada) 8 months ago

  • Status changed from Open to Closed

Also available in: Atom PDF