class Rake::Application
def const_warning(const_name)
def const_warning(const_name) @const_warning ||= false if ! @const_warning $stderr.puts %{WARNING: Deprecated reference to top-level constant '#{const_name}' } + %{found at: #{rakefile_location}} # ' $stderr.puts %{ Use --classic-namespace on rake command} $stderr.puts %{ or 'require "rake/classic_namespace"' in Rakefile} end @const_warning = true end