Last active
March 6, 2022 17:21
-
-
Save a2ikm/30fdbfb8ed4b4df6951a9b8295e93a3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "activesupport", "~> #{ENV["AS_VERSION"]}" | |
end | |
require "active_support" | |
p RUBY_VERSION | |
p ActiveSupport.version.to_s | |
module C | |
extend ActiveSupport::DescendantsTracker | |
end | |
p C.subclasses | |
module M | |
extend ActiveSupport::DescendantsTracker | |
end | |
p M.subclasses | |
# $ AS_VERSION=6.1 ruby module-subclasses.rb | |
# "3.1.0" | |
# "6.1.4.6" | |
# [] | |
# [] | |
# $ AS_VERSION=7.0 ruby module-subclasses.rb | |
# "3.0.2" | |
# "7.0.2.2" | |
# [] | |
# [] | |
# $ AS_VERSION=7.0 ruby module-subclasses.rb | |
# "3.1.0" | |
# "7.0.2.2" | |
# [] | |
# /path/to/activesupport-7.0.2.2/lib/active_support/descendants_tracker.rb:83:in `subclasses': super: no superclass method `subclasses' for M:Module (NoMethodError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment