Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly remove the buildin rails adapter
`defined?` for a string literal is always truthy, same as for symbols. `defined?(ActiveJob::QueueAdapters::SneakersAdapter)` would work as an alternative. ```rb module ActiveJob module QueueAdapters # Adapter removed from rails end end module ActiveJob module QueueAdapters remove_const(:SneakersAdapter) if defined?("::#{name}::SneakersAdapter") end end ``` test.rb:10:in `remove_const': constant ActiveJob::QueueAdapters::SneakersAdapter not defined (NameError)
- Loading branch information