Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions stdlib/erb/0/erb.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ class ERB
# It's good practice to choose a variable name that begins with an underscore:
# <code>'_'</code>.
#
def initialize: (String, ?eoutvar: String, ?trim_mode: Integer | String | NilClass) -> untyped
def initialize: (String, ?eoutvar: String, ?trim_mode: Integer | String | NilClass) -> void

# <!-- rdoc-file=lib/erb.rb -->
# Returns the Ruby code that, when executed, generates the result;
Expand Down Expand Up @@ -702,7 +702,7 @@ class ERB
# Like #result, but prints the result string (instead of returning it);
# returns `nil`.
#
def run: (?Binding) -> untyped
def run: (?Binding) -> nil

# <!--
# rdoc-file=lib/erb.rb
Expand Down Expand Up @@ -746,7 +746,7 @@ class ERB
# class MyClass; include MyModule; end
# MyClass.new.render('foo', 123) # => "foo 123"
#
def def_method: (Module, String, ?String) -> untyped
def def_method: (Module, String, ?String) -> Symbol

# <!--
# rdoc-file=lib/erb.rb
Expand Down Expand Up @@ -913,7 +913,7 @@ class ERB
# define *methodname* as instance method of current module, using ERB object or
# eRuby file
#
def self.def_erb_method: (String methodname, (String | ERB) erb_or_fname) -> untyped
def self.def_erb_method: (String methodname, (String | ERB) erb_or_fname) -> Symbol
end

# <!-- rdoc-file=lib/erb/util.rb -->
Expand Down
8 changes: 4 additions & 4 deletions stdlib/monitor/0/monitor.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Monitor
# - wait_for_cond(p1, p2)
# -->
#
def wait_for_cond: (::MonitorMixin::ConditionVariable, Numeric? timeout) -> untyped
def wait_for_cond: (::MonitorMixin::ConditionVariable, Numeric? timeout) -> bool
end

# <!-- rdoc-file=ext/monitor/lib/monitor.rb -->
Expand Down Expand Up @@ -334,23 +334,23 @@ class MonitorMixin::ConditionVariable
# If `timeout` is given, this method returns after `timeout` seconds passed,
# even if no other thread doesn't signal.
#
def wait: (?Numeric? timeout) -> untyped
def wait: (?Numeric? timeout) -> bool

# <!--
# rdoc-file=ext/monitor/lib/monitor.rb
# - wait_until()
# -->
# Calls wait repeatedly until the given block yields a truthy value.
#
def wait_until: () { () -> boolish } -> untyped
def wait_until: () { () -> boolish } -> nil

# <!--
# rdoc-file=ext/monitor/lib/monitor.rb
# - wait_while()
# -->
# Calls wait repeatedly while the given block yields a truthy value.
#
def wait_while: () { () -> boolish } -> untyped
def wait_while: () { () -> boolish } -> nil

private

Expand Down
2 changes: 1 addition & 1 deletion stdlib/stringio/0/stringio.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ class StringIO
# -->
# See IO#putc.
#
def putc: (Numeric | String arg0) -> untyped
def putc: (Numeric | String arg0) -> (Numeric | String)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about to like this?

Suggested change
def putc: (Numeric | String arg0) -> (Numeric | String)
def putc: (real) -> real
(String) -> String

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied it to IO as well.


def puts: (*untyped arg0) -> nil

Expand Down
2 changes: 1 addition & 1 deletion stdlib/zlib/0/gzip_file.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ module Zlib
# `flush` method. While `sync` mode is `true`, the compression ratio decreases
# sharply.
#
def sync=: (boolish) -> untyped
def sync=: (boolish) -> boolish

# <!--
# rdoc-file=ext/zlib/zlib.c
Expand Down
2 changes: 1 addition & 1 deletion stdlib/zlib/0/gzip_writer.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module Zlib
# -->
# Same as IO.
#
def putc: (Numeric | String arg0) -> untyped
def putc: (Numeric | String arg0) -> (Numeric | String)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


# <!--
# rdoc-file=ext/zlib/zlib.c
Expand Down
Loading