Module: SilenceReloadConstWarnings
- Defined in:
- lib/fresco/cli/dev_loop.rb
Overview
‘load`-ing the generated runtime + actions on every reload re-runs their toplevel `FOO = …` assignments, which Ruby warns about. The redefinitions are intentional under the dev reloader, so filter just those two warning shapes — everything else (uninitialized ivars, method redefinitions, etc.) still flows through.
Constant Summary collapse
- IGNORE =
/already initialized constant|previous definition of/
Instance Method Summary collapse
Instance Method Details
#warn(msg, category: nil) ⇒ Object
61 62 63 64 |
# File 'lib/fresco/cli/dev_loop.rb', line 61 def warn(msg, category: nil) return if msg.is_a?(String) && msg.match?(IGNORE) super end |