Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 72 additions & 3 deletions core/file.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,30 @@
# * [Open Options](rdoc-ref:IO@Open+Options).
# * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
#
def initialize: (path | int file_name, ?string | int mode, ?int perm) -> void
def initialize: (
path | int file_name,
?string | int mode,
?int perm,
# open options

Check failure on line 854 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).

Check failure on line 854 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).
?mode: Integer | String,
?flags: Integer,
?external_encoding: encoding,
?internal_encoding: encoding,
?encoding: encoding,
?textmode: boolish,
?binmode: boolish,
?autoclose: boolish,
?path: path,
# encoding options

Check failure on line 864 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).

Check failure on line 864 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).
?invalid: :replace | nil,
?undef: :replace | nil,
?replace: String | nil,
?fallback: Hash[string, string] | ^(String) -> string | Method | nil,
?xml: :text | :attr | nil,
?cr_newline: bool,
?crlf_newline: bool,
?universal_newline: bool
) -> void

# <!--
# rdoc-file=file.c
Expand Down Expand Up @@ -1407,8 +1430,54 @@
# With a block given, calls the block with the File object and returns the
# block's value.
#
def self.open: (path | int file_name, ?string | int mode, ?int perm) -> instance
| [T] (path | int file_name, ?string | int mode, ?int perm) { (File) -> T } -> T
def self.open: (
path | int file_name,
?string | int mode,
?int perm,
# open options

Check failure on line 1437 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).

Check failure on line 1437 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).
?mode: Integer | String,
?flags: Integer,
?external_encoding: encoding,
?internal_encoding: encoding,
?encoding: encoding,
?textmode: boolish,
?binmode: boolish,
?autoclose: boolish,
?path: path,
# encoding options

Check failure on line 1447 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).

Check failure on line 1447 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).
?invalid: :replace | nil,
?undef: :replace | nil,
?replace: String | nil,
?fallback: Hash[string, string] | ^(String) -> string | Method | nil,
?xml: :text | :attr | nil,
?cr_newline: bool,
?crlf_newline: bool,
?universal_newline: bool
) -> instance |

Check failure on line 1456 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/SpaceBeforeOverload: Use one space before overload.

Check failure on line 1456 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/OverloadIndentation: Insert newline before `|`

Check failure on line 1456 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/SpaceBeforeOverload: Use one space before overload.

Check failure on line 1456 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/OverloadIndentation: Insert newline before `|`
[T] (
path | int file_name,
?string | int mode,
?int perm,
# open options

Check failure on line 1461 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).

Check failure on line 1461 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).
?mode: Integer | String,
?flags: Integer,
?external_encoding: encoding,
?internal_encoding: encoding,
?encoding: encoding,
?textmode: boolish,
?binmode: boolish,
?autoclose: boolish,
?path: path,
# encoding options

Check failure on line 1471 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).

Check failure on line 1471 in core/file.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).
?invalid: :replace | nil,
?undef: :replace | nil,
?replace: String | nil,
?fallback: Hash[string, string] | ^(String) -> string | Method | nil,
?xml: :text | :attr | nil,
?cr_newline: bool,
?crlf_newline: bool,
?universal_newline: bool
) { (File) -> T } -> T

# <!--
# rdoc-file=file.c
Expand Down
48 changes: 46 additions & 2 deletions core/pathname.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@
# rdoc-file=pathname_builtin.rb
# - mountpoint?()
# -->
# Returns `true` if `self` points to a mountpoint.

Check failure on line 844 in core/pathname.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).

Check failure on line 844 in core/pathname.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).
#
def mountpoint?: () -> bool

Expand All @@ -851,7 +851,7 @@
# -->
# See `File.mtime`. Returns last modification time.
#
def mtime: () -> Time

Check failure on line 854 in core/pathname.rbs

View workflow job for this annotation

GitHub Actions / test (head, stdlib_test rubocop)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).

Check failure on line 854 in core/pathname.rbs

View workflow job for this annotation

GitHub Actions / test (4.0, rubocop validate test_doc build test_generate_stdlib raap)

RBS/Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 6).

# <!--
# rdoc-file=pathname_builtin.rb
Expand All @@ -859,8 +859,52 @@
# -->
# See `File.open`. Opens the file for reading or writing.
#
def open: (?string | int mode, ?int perm) -> File
| [T] (?string | int mode, ?int perm) { (File) -> T } -> T
def open: (
?string | int mode,
?int perm,
# open options
?mode: Integer | String,
?flags: Integer,
?external_encoding: encoding,
?internal_encoding: encoding,
?encoding: encoding,
?textmode: boolish,
?binmode: boolish,
?autoclose: boolish,
?path: path,
# encoding options
?invalid: :replace | nil,
?undef: :replace | nil,
?replace: String | nil,
?fallback: Hash[string, string] | ^(String) -> string | Method | nil,
?xml: :text | :attr | nil,
?cr_newline: bool,
?crlf_newline: bool,
?universal_newline: bool
) -> File
| [T] (
?string | int mode,
?int perm,
# open options
?mode: Integer | String,
?flags: Integer,
?external_encoding: encoding,
?internal_encoding: encoding,
?encoding: encoding,
?textmode: boolish,
?binmode: boolish,
?autoclose: boolish,
?path: path,
# encoding options
?invalid: :replace | nil,
?undef: :replace | nil,
?replace: String | nil,
?fallback: Hash[string, string] | ^(String) -> string | Method | nil,
?xml: :text | :attr | nil,
?cr_newline: bool,
?crlf_newline: bool,
?universal_newline: bool
) { (File) -> T } -> T

# <!--
# rdoc-file=pathname_builtin.rb
Expand Down