diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-05-18 10:43:26 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-06-19 18:46:55 +0900 |
commit | d863f4bccdd1b5566fbdbe87af766e54b995f8af (patch) | |
tree | 23f94a6dd5296847446a240615e2bc393457bf1d /dir.rb | |
parent | c8703a17ceedae4a72f83c962a4d098731a85dda (diff) |
[Feature #16254] Use `__builtin.func` style
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3165
Diffstat (limited to 'dir.rb')
-rw-r--r-- | dir.rb | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -12,12 +12,12 @@ class Dir # directory is closed at the end of the block, and Dir::open returns # the value of the block. def self.open(name, encoding: nil, &block) - dir = __builtin_dir_s_open(name, encoding) + dir = __builtin.dir_s_open(name, encoding) if block begin yield dir ensure - __builtin_dir_s_close(dir) + __builtin.dir_s_close(dir) end else dir @@ -32,7 +32,7 @@ class Dir # The optional <i>encoding</i> keyword argument specifies the encoding of the directory. # If not specified, the filesystem encoding is used. def initialize(name, encoding: nil) - __builtin_dir_initialize(name, encoding) + __builtin.dir_initialize(name, encoding) end # Dir[ string [, string ...] [, base: path] [, sort: true] ] -> array @@ -40,7 +40,7 @@ class Dir # Equivalent to calling # <code>Dir.glob([</code><i>string,...</i><code>], 0)</code>. def self.[](*args, base: nil, sort: true) - __builtin_dir_s_aref(args, base, sort) + __builtin.dir_s_aref(args, base, sort) end # Dir.glob( pattern, [flags], [base: path] [, sort: true] ) -> array @@ -133,6 +133,6 @@ class Dir # librbfiles = File.join("**", "lib", "*.rb") # Dir.glob(librbfiles) #=> ["lib/song.rb"] def self.glob(pattern, _flags = 0, flags: _flags, base: nil, sort: true) - __builtin_dir_s_glob(pattern, flags, base, sort) + __builtin.dir_s_glob(pattern, flags, base, sort) end end |