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
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
os:
- ubuntu
- macos
- windows

ruby:
- "3.3"
Expand Down
2 changes: 1 addition & 1 deletion ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$LDFLAGS << " -fsanitize=address -fsanitize=undefined"
end

have_func("rb_tracearg_instruction_sequence", "ruby/debug.h")
have_func("rb_tracearg_instruction_sequence((rb_trace_arg_t *)0)", "ruby/debug.h")

create_header

Expand Down
6 changes: 3 additions & 3 deletions ext/ruby/coverage/tracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ static void Ruby_Coverage_Tracer_on_line(VALUE data, const rb_trace_arg_t *trace

static VALUE Ruby_Coverage_Tracer_start(VALUE self)
{
struct Ruby_Coverage_Tracer *tracer;
TypedData_Get_Struct(self, struct Ruby_Coverage_Tracer, &Ruby_Coverage_Tracer_type, tracer);

#ifdef HAVE_RB_TRACEARG_INSTRUCTION_SEQUENCE
rb_add_event_hook2(
(rb_event_hook_func_t)Ruby_Coverage_Tracer_on_script_compiled,
Expand All @@ -302,6 +299,9 @@ static VALUE Ruby_Coverage_Tracer_start(VALUE self)
RUBY_EVENT_HOOK_FLAG_SAFE | RUBY_EVENT_HOOK_FLAG_RAW_ARG
);
#else
struct Ruby_Coverage_Tracer *tracer;
TypedData_Get_Struct(self, struct Ruby_Coverage_Tracer, &Ruby_Coverage_Tracer_type, tracer);

if (NIL_P(tracer->script_compiled_tracepoint)) {
RB_OBJ_WRITE(self, &tracer->script_compiled_tracepoint,
rb_tracepoint_new(Qnil, RUBY_EVENT_SCRIPT_COMPILED,
Expand Down
4 changes: 4 additions & 0 deletions releases.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Releases

## Unreleased

- Fix native extension builds on Windows when `rb_tracearg_instruction_sequence` is not declared by Ruby's public headers, and avoid an unused variable compiler warning.

## v0.1.1

- Fix an unused variable compiler warning in the native extension.
Expand Down
Loading