Created
September 24, 2020 20:07
-
-
Save jhawthorn/023c821f8aac6376e62c84784a09f21d to your computer and use it in GitHub Desktop.
Ruby 2.6 autoload/inspect/name bug
This file contains 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
module MyHelper | |
m = Module.new | |
m.inspect # #inspect break this. #name is fine. wtffffff | |
FooBar = m | |
FooBarName = FooBar.name | |
end |
This file contains 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
Object.autoload :MyHelper, "./my_helper" | |
p MyHelper::FooBarName | |
# nil on Ruby 2.6 | |
# "MyHelper::FooBar" on Ruby 2.7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment