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
16 changes: 8 additions & 8 deletions ext/coverage/coverage.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ rb_coverage_resume(VALUE klass)

/*
* call-seq:
* Coverage.start => nil
* Coverage.start(:all) => nil
* Coverage.start(lines: bool, branches: bool, methods: bool, eval: bool) => nil
* Coverage.start(oneshot_lines: true) => nil
*
* Enables the coverage measurement.
* See the documentation of Coverage class in detail.
* This is equivalent to Coverage.setup and Coverage.resume.
* Coverage.start -> nil
* Coverage.start(type) -> nil
* Coverage.start(lines: false, branches: false, methods: false, eval: false, oneshot_lines: false) -> nil
*
* Enables coverage measurement.
* This method is equivalent to calling Coverage.setup with the arguments provided,
* and then calling Coverage.resume. See their respective documentation for more
* details.
*/
static VALUE
rb_coverage_start(int argc, VALUE *argv, VALUE klass)
Expand Down
1 change: 1 addition & 0 deletions ext/win32/lib/win32/registry.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'fiddle/import'

# Generic namespace for Windows platform-specific features.
module Win32
# :stopdoc:
WCHAR = Encoding::UTF_16LE
Expand Down
2 changes: 1 addition & 1 deletion ext/win32/lib/win32/resolv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require 'win32/resolv.so'

module Win32
module Resolv
module Resolv # :nodoc:
# Error at Win32 API
class Error < StandardError
# +code+ Win32 Error code
Expand Down
3 changes: 2 additions & 1 deletion ext/win32/resolv/resolv.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ wchar_to_utf8(const WCHAR *w, int n)
return str;
}

/* :nodoc: */
static VALUE
get_dns_server_list(VALUE self)
{
Expand Down Expand Up @@ -81,7 +82,6 @@ get_dns_server_list(VALUE self)
return nameservers;
}


static const WCHAR TCPIP_Params[] = L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters";

static void
Expand Down Expand Up @@ -116,6 +116,7 @@ reg_open_key(VALUE klass, HKEY hkey, const WCHAR *wname)
return rb_ensure(rb_yield, k, hkey_close, k);
}

/* :nodoc: */
static VALUE
tcpip_params_open(VALUE klass)
{
Expand Down
1 change: 1 addition & 0 deletions lib/timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ def self.timeout(sec, klass = nil, message = nil, &block) #:yield: +sec+
end
end

# See Timeout.timeout
private def timeout(*args, &block)
Timeout.timeout(*args, &block)
end
Expand Down
21 changes: 4 additions & 17 deletions ractor_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,15 @@ ractor_port_mark(void *ptr)
}
}

static void
ractor_port_free(void *ptr)
{
SIZED_FREE((struct ractor_port *)ptr);
}

static size_t
ractor_port_memsize(const void *ptr)
{
return sizeof(struct ractor_port);
}

static const rb_data_type_t ractor_port_data_type = {
"ractor/port",
{
ractor_port_mark,
ractor_port_free,
ractor_port_memsize,
RUBY_TYPED_DEFAULT_FREE,
NULL, // memsize
NULL, // update
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FROZEN_SHAREABLE,
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FROZEN_SHAREABLE | RUBY_TYPED_EMBEDDABLE,
};

static st_data_t
Expand All @@ -62,8 +50,7 @@ static struct ractor_port *
RACTOR_PORT_PTR(VALUE self)
{
VM_ASSERT(rb_typeddata_is_kind_of(self, &ractor_port_data_type));
struct ractor_port *rp = DATA_PTR(self);
return rp;
return RTYPEDDATA_GET_DATA(self);
}

static VALUE
Expand Down