Skip to content

Commit

Permalink
Native extension: include ruby/debug.h for rb_postponed_job_register_…
Browse files Browse the repository at this point in the history
…one prototype

Avoids relying on the implicit declaration. Fixes compiling with latest Clang from Xcode 12. Closes #81.
  • Loading branch information
georgeclaghorn authored and tmm1 committed Jul 7, 2020
1 parent 4b6b80c commit 7aee201
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/rbtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <msgpack.h>
#include <ruby.h>
#include <ruby/debug.h>

#ifndef RUBY_VM
#include <env.h>
Expand Down

1 comment on commit 7aee201

@martindorey
Copy link

Choose a reason for hiding this comment

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

ruby/debug.h was introduced with ruby/ruby@cea7600#diff-0a664fffd3b89256eb738e146535994539ffc48424e16ace9c75506351ebe00c first tagged with v2_0_0_preview2, so this breaks compatibility with Ruby 1.9.3 and Ruby 1.8.7, the last versions on those branches. Surely that's fair enough but it would have helped me if we had the required_ruby_version declared in the gemspec.

Please sign in to comment.