Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ RBS/Style:
- 'test/**/*'
RBS/Style/BlockReturnBoolish:
Enabled: true
RBS/Style/ClassWithSingleton:
Enabled: true
RBS/Style/DuplicatedType:
Enabled: true
RBS/Style/EmptyArgument:
Enabled: true
RBS/Style/InitializeReturnType:
Enabled: true
RBS/Style/InstanceWithInstance:
Enabled: true
RBS/Style/OptionalNil:
Enabled: true
RBS/Style/RedundantParentheses:
Expand Down
2 changes: 1 addition & 1 deletion core/data.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -411,5 +411,5 @@ class Data
# out = origin.with(z: 1) # ArgumentError: unknown keyword: :z
# some_point = origin.with(1, 2) # ArgumentError: expected keyword arguments, got positional arguments
#
def with: (**untyped) -> instance
def with: (**untyped) -> self
end
2 changes: 1 addition & 1 deletion core/exception.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class Exception
# x0..equal?(x1) # => false
#
def exception: (?self) -> self
| (string | _ToS message) -> instance
| (string | _ToS message) -> self

# <!--
# rdoc-file=error.c
Expand Down
4 changes: 2 additions & 2 deletions core/method.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Method
#
def hash: () -> Integer

def dup: () -> instance
def dup: () -> self

# <!--
# rdoc-file=proc.c
Expand Down Expand Up @@ -252,7 +252,7 @@ class Method
# m.call # => "bar"
# n = m.clone.call # => "bar"
#
def clone: () -> instance
def clone: () -> self

# <!--
# rdoc-file=proc.c
Expand Down
4 changes: 2 additions & 2 deletions core/module.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,8 @@ class Module < Object
# I'm Dino!
# #<B:0x401b39e8>
#
def define_method: (interned symbol, ^() [self: instance] -> untyped | Method | UnboundMethod method) -> Symbol
| (interned symbol) { () [self: instance] -> untyped } -> Symbol
def define_method: (interned symbol, ^() [self: self] -> untyped | Method | UnboundMethod method) -> Symbol
| (interned symbol) { () [self: self] -> untyped } -> Symbol

# <!--
# rdoc-file=object.c
Expand Down
4 changes: 2 additions & 2 deletions core/proc.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ class Proc
#
def self.new: () { (?) -> untyped } -> instance

def clone: () -> instance
def dup: () -> instance
def clone: () -> self
def dup: () -> self

# <!-- rdoc-file=proc.c -->
# Invokes the block, setting the block's parameters to the values in *params*
Expand Down
4 changes: 2 additions & 2 deletions core/rubygems/version.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ module Gem
#
# Pre-release (alpha) parts, e.g, 5.3.1.b.2 => 5.4, are ignored.
#
def bump: () -> instance
def bump: () -> self

# <!--
# rdoc-file=lib/rubygems/version.rb
Expand Down Expand Up @@ -274,7 +274,7 @@ module Gem
# The release for this version (e.g. 1.2.0.a -> 1.2.0). Non-prerelease versions
# return themselves.
#
def release: () -> instance
def release: () -> self

# <!--
# rdoc-file=lib/rubygems/version.rb
Expand Down
2 changes: 1 addition & 1 deletion core/string.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,7 @@ class String
?crlf_newline: boolish,
?lf_newline: boolish,
?fallback: ^(String) -> string? | Method | _EncodeFallbackAref
) -> instance
) -> self

interface _EncodeFallbackAref
def []: (String) -> string?
Expand Down
2 changes: 1 addition & 1 deletion core/unbound_method.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class UnboundMethod
# m.call # => "bar"
# n = m.clone.call # => "bar"
#
def clone: () -> instance
def clone: () -> self

# <!--
# rdoc-file=proc.c
Expand Down
Loading