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
2 changes: 0 additions & 2 deletions .github/workflows/sentry_rails_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ jobs:
rails_version: "8.0.0"
- ruby_version: "3.4"
rails_version: "8.0.0"
- ruby_version: "jruby"
rails_version: 6.1.0
- ruby_version: "3.2"
rails_version: 7.1.0
options:
Expand Down
10 changes: 5 additions & 5 deletions sentry-ruby/spec/sentry/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ def sentry_context
event = nil

t = Thread.new do
Thread.current.name = "Thread 1"
event = subject.event_from_message(message)
end

t.name = "Thread 1"
t.join
hash = event.to_hash

Expand Down Expand Up @@ -321,15 +321,15 @@ def sentry_context
version = Gem::Version.new(RUBY_VERSION)

case
when version >= Gem::Version.new("3.4.0-dev")
when version >= Gem::Version.new("3.4.0-dev") && RUBY_ENGINE == "ruby"
expect(hash[:exception][:values][0][:value]).to eq(
"undefined method '[]' for nil (NoMethodError)\n\n {}[:foo][:bar]\n ^^^^^^"
)
when version >= Gem::Version.new("3.3.0-dev")
when version >= Gem::Version.new("3.3.0-dev") && RUBY_ENGINE == "ruby"
expect(hash[:exception][:values][0][:value]).to eq(
"undefined method `[]' for nil (NoMethodError)\n\n {}[:foo][:bar]\n ^^^^^^"
)
when version >= Gem::Version.new("3.2")
when version >= Gem::Version.new("3.2") && RUBY_ENGINE == "ruby"
expect(hash[:exception][:values][0][:value]).to eq(
"undefined method `[]' for nil:NilClass (NoMethodError)\n\n {}[:foo][:bar]\n ^^^^^^"
)
Expand Down Expand Up @@ -365,10 +365,10 @@ def detailed_message(*)
event = nil

t = Thread.new do
Thread.current.name = "Thread 1"
event = subject.event_from_exception(exception)
end

t.name = "Thread 1"
t.join

event_hash = event.to_hash
Expand Down
6 changes: 3 additions & 3 deletions sentry-ruby/spec/sentry/vernier/profiler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "sentry/vernier/profiler"

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

before do
Expand Down Expand Up @@ -264,7 +264,7 @@
expect(thread2[:name]).to eq("thread-bar-1")
end

it 'has correct frames', when: { ruby_version?: [:>=, "3.3"] } do
it 'has correct frames', when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
frames = profiler.to_hash[:profile][:frames]

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

it 'has correct stacks', when: { ruby_version?: [:>=, "3.3"] } do
it 'has correct stacks', when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
profile = profiler.to_hash[:profile]
frames = profile[:frames]
stacks = profile[:stacks]
Expand Down
Loading