Ruby: 开启警告模式

命令行开启

ruby -w0 a.rb // set warning level; 0=silence, 1=medium, 2=verbose (default)

在 Rails 中开启

# config/application.rb

class Application < Rails::Application
  $VERBOSE = true
end