diff --git a/.github/workflows/sentry_rails_test.yml b/.github/workflows/sentry_rails_test.yml index 306cef080..3084ff8e4 100644 --- a/.github/workflows/sentry_rails_test.yml +++ b/.github/workflows/sentry_rails_test.yml @@ -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: diff --git a/sentry-ruby/spec/sentry/client_spec.rb b/sentry-ruby/spec/sentry/client_spec.rb index a87e81fea..f455f6ca6 100644 --- a/sentry-ruby/spec/sentry/client_spec.rb +++ b/sentry-ruby/spec/sentry/client_spec.rb @@ -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 @@ -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 ^^^^^^" ) @@ -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 diff --git a/sentry-ruby/spec/sentry/vernier/profiler_spec.rb b/sentry-ruby/spec/sentry/vernier/profiler_spec.rb index 7b0398a66..b8ef3a105 100644 --- a/sentry-ruby/spec/sentry/vernier/profiler_spec.rb +++ b/sentry-ruby/spec/sentry/vernier/profiler_spec.rb @@ -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 @@ -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/ } @@ -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]