-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Closed
Closed
Copy link
Description
I discovered this issue while upgrading a small app that uses haml_rails
which is using SourceAnnotationExtractor::Annotation
in version 1.
Here is the PR that introduced the changes #32065
Steps to reproduce
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Activate the gem you are reporting the issue against.
gem 'rails', '6.0.0.rc1'
end
require "active_support"
require "active_support/core_ext/object/blank"
require "rails/source_annotation_extractor"
require "minitest/autorun"
def extractor
SourceAnnotationExtractor
end
def annotation
SourceAnnotationExtractor::Annotation
end
class SourceAnnotationExtractorTest < ActiveSupport::TestCase
test 'test_stuff' do
assert_not_nil extractor
end
test 'more_stuff' do
assert_not_nil annotation
end
end
Expected behavior
I would expect both tests to pass with a Deprecation warning pointing to the updated module info.
Actual behavior
The main class SourceAnnotationExtractor has the warning, but ::Annotation outputs TypeError: Rails::SourceAnnotationExtractor is not a class/module
System configuration
Rails version:
6.0.0.rc1
Ruby version:
2.6.2p47