Skip to content

Instantly share code, notes, and snippets.

@jhawthorn
Created September 24, 2020 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhawthorn/023c821f8aac6376e62c84784a09f21d to your computer and use it in GitHub Desktop.
Save jhawthorn/023c821f8aac6376e62c84784a09f21d to your computer and use it in GitHub Desktop.
Ruby 2.6 autoload/inspect/name bug
module MyHelper
m = Module.new
m.inspect # #inspect break this. #name is fine. wtffffff
FooBar = m
FooBarName = FooBar.name
end
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