Commander gem shows DEPRECATION WARNING: MissingSourceFile is deprecated! Use LoadError instead. warning when we use commander v4.4.0 with ActiveSupport v5+.
warning is thrown from /lib/commander/user_interaction.rb while executing
module AskForClass
# All special cases in HighLine::Question#convert, except those that implement #parse
(
[Float, Integer, String, Symbol, Regexp, Array, File, Pathname] +
# All Classes that respond to #parse
Object.constants.map do |const|
# Ignore constants that trigger deprecation warnings
Object.const_get(const) unless [:Config, :TimeoutError].include?(const)
end.select do |const|
const.class == Class && const.respond_to?(:parse)
end
).each do |klass|
define_method "ask_for_#{klass.to_s.downcase}" do |prompt|
$terminal.ask(prompt, klass)
end
end
end
which defines the deprecation_message method for the ActiveSupport::Deprecation::Reporting module lib/active_support/deprecation/reporting.rb while executing
def deprecation_message(callstack, message = nil)
message ||= "You are using deprecated behavior which will be removed from the next major or minor release."
"DEPRECATION WARNING: #{message} #{deprecation_caller_message(callstack)}"
end
Commander gem shows
DEPRECATION WARNING: MissingSourceFile is deprecated! Use LoadError instead.
warning when we use commander v4.4.0 with ActiveSupport v5+.warning is thrown from
/lib/commander/user_interaction.rb
while executingwhich defines the deprecation_message method for the ActiveSupport::Deprecation::Reporting module
lib/active_support/deprecation/reporting.rb
while executingcould you please fix this issue.