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

Fix ActiveSupport's undefined method deprecator for ActiveSupport:Module (NoMethodError) issue #37

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

ahasunos
Copy link

Description

This PR fixes the issue raised by ActiveSupport when using activesupport-7.1.1. The error results is:

/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>': undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

  deprecate to_default_s: :to_s, deprecator: ActiveSupport.deprecator
                                                          ^^^^^^^^^^^
Did you mean?  deprecate_constant

The issue is caused because of not requiring active_support before requiring anything inside of active_support

Read more about the issue here:
inspec/train#751
rails/rails#49495 (comment)

Related Issue

rails/rails#49495
inspec/train#750

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

@ahasunos ahasunos changed the title Fix ActiveSupport's undefined method deprecator' for ActiveSupport:Module (NoMethodError)` issue Fix ActiveSupport's undefined method deprecator for ActiveSupport:Module (NoMethodError) issue Oct 12, 2023
@ahasunos ahasunos self-assigned this Oct 12, 2023
@ahasunos ahasunos merged commit 6ee35ee into main Oct 17, 2023
1 check passed
@ahasunos ahasunos deleted the ss/fix-ActiveSupport.deprecator-issue branch October 17, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants