Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JRuby 9.4 to testing matrix; nerf ActiveJob::TestQueueAdapter overrides #1067

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

bensheldon
Copy link
Owner

@bensheldon bensheldon commented Sep 4, 2023

I am experiencing problems with JRuby 9.4.3.0 and the usage of prepend and calling descendants (which is called by ActiveJob::TestHelper, with exceptions that look like: jruby/jruby#6896

It is a little strange though because it could be a combination of stub_constant and doing weird things with ActiveSupport::Concern like:

included do
prepend Prepends

Unfortunately, I wasn't able to isolate it down, but my working theory is that something like this should be problematic (though maybe it is specifically stub_const):

require 'bundler/inline'
gemfile do
  gem 'activesupport'
end

require 'active_support/concern'
require 'active_support/descendants_tracker'
module Paws
  extend ::ActiveSupport::Concern

  module Prepends
    def paws
      puts 'PAWS'
    end
  end

  included do
    prepend Prepends
  end
end

class Animal
  extend ActiveSupport::DescendantsTracker
end

class Dog < Animal
  include Paws
end

puts Dog.new.paws
puts Animal.descendants
puts ObjectSpace.each_object(Module).each(&:singleton_class)

@bensheldon bensheldon force-pushed the jruby_94 branch 2 times, most recently from 81af06c to 63117d1 Compare September 4, 2023 19:00
@bensheldon bensheldon merged commit c0e1408 into main Sep 4, 2023
20 checks passed
@bensheldon bensheldon deleted the jruby_94 branch September 4, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant