Skip to content

Commit 91456c5

Browse files
committed
Ignore vernier on ruby 4.1.0
1 parent 620047f commit 91456c5

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

sentry-ruby/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ gem "puma"
2121

2222
gem "timecop"
2323
gem "stackprof" unless RUBY_PLATFORM == "java"
24-
gem "vernier", platforms: :ruby if RUBY_VERSION >= "3.2.1"
24+
gem "vernier", platforms: :ruby if RUBY_VERSION >= "3.3" && RUBY_VERSION < "4.1.0"
2525

2626
gem "graphql", ">= 2.2.6"
2727

sentry-ruby/spec/sentry/vernier/profiler_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "sentry/vernier/profiler"
44

5-
RSpec.describe Sentry::Vernier::Profiler, when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
5+
RSpec.describe Sentry::Vernier::Profiler, when: :vernier_installed? do
66
subject(:profiler) { described_class.new(Sentry.configuration) }
77

88
before do
@@ -283,7 +283,7 @@
283283
expect(thread2[:name]).to eq("thread-bar-1")
284284
end
285285

286-
it 'has correct frames', when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
286+
it 'has correct frames' do
287287
frames = profiler.to_h[:profile][:frames]
288288

289289
foo_frame = frames.find { |f| f[:function] =~ /foo/ }
@@ -296,7 +296,7 @@
296296
expect(foo_frame[:abs_path]).to include('sentry-ruby/spec/support/profiler.rb')
297297
end
298298

299-
it 'has correct stacks', when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
299+
it 'has correct stacks' do
300300
profile = profiler.to_h[:profile]
301301
frames = profile[:frames]
302302
stacks = profile[:stacks]

sentry-ruby/spec/spec_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
require "rspec/retry"
1111
require "redis"
1212
require "stackprof" unless RUBY_PLATFORM == "java"
13-
require "vernier" unless RUBY_PLATFORM == "java" || RUBY_VERSION < "3.2"
13+
begin
14+
require "vernier"
15+
rescue LoadError
16+
end
1417

1518
SimpleCov.start do
1619
project_name "sentry-ruby"

0 commit comments

Comments
 (0)