Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated previous changes to use the new type aliases #1488

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/binding.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Binding
#
# binding.eval("defined?(#{symbol}) == 'local-variable'")
#
def local_variable_defined?: (Symbol | string varname) -> bool
def local_variable_defined?: (interned varname) -> bool

# <!--
# rdoc-file=proc.c
Expand All @@ -84,7 +84,7 @@ class Binding
#
# binding.eval("#{symbol}")
#
def local_variable_get: (Symbol | string varname) -> untyped
def local_variable_get: (interned varname) -> untyped

# <!--
# rdoc-file=proc.c
Expand All @@ -111,7 +111,7 @@ class Binding
#
# if `obj` can be dumped in Ruby code.
#
def local_variable_set: [U] (Symbol | string varname, U obj) -> U
def local_variable_set: [U] (interned varname, U obj) -> U

# <!--
# rdoc-file=proc.c
Expand Down
4 changes: 2 additions & 2 deletions core/dir.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ class Dir
#
# Dir.glob("**/lib/*.rb") #=> ["lib/song.rb"]
#
def self.glob: (_ToAry[path] | path pattern, ?int flags, ?base: path?, ?sort: bool) -> Array[String]
| (_ToAry[path] | path pattern, ?int flags, ?base: path?, ?sort: bool) { (String pathname) -> void } -> nil
def self.glob: (array[path] | path pattern, ?int flags, ?base: path?, ?sort: bool) -> Array[String]
| (array[path] | path pattern, ?int flags, ?base: path?, ?sort: bool) { (String pathname) -> void } -> nil

# <!--
# rdoc-file=dir.c
Expand Down
6 changes: 3 additions & 3 deletions core/kernel.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ module Kernel : BasicObject
# Hash([]) # => {}
#
def self?.Hash: [K, V] (nil | [] _empty) -> Hash[K, V]
| [K, V] (_ToHash[K, V] hash_like) -> Hash[K, V]
| [K, V] (hash[K, V] hash_like) -> Hash[K, V]

# <!--
# rdoc-file=object.c
Expand Down Expand Up @@ -846,7 +846,7 @@ module Kernel : BasicObject
#
def self?.fail: () -> bot
| (string message, ?cause: Exception?) -> bot
| (_Exception exception, ?_ToS? message, ?nil | String | Array[String] backtrace, ?cause: Exception?) -> bot
| (_Exception exception, ?_ToS? message, ?String | Array[String] | nil backtrace, ?cause: Exception?) -> bot

# <!--
# rdoc-file=eval.c
Expand Down Expand Up @@ -1568,7 +1568,7 @@ module Kernel : BasicObject
# Time.new #=> 2008-03-08 19:56:22 +0900
#
def self?.sleep: (?nil) -> bot
| ((Integer | Float | _Divmod) duration) -> Integer
| (Integer | Float | _Divmod duration) -> Integer

interface _Divmod
def divmod: (Numeric) -> [ Numeric, Numeric ]
Expand Down