Module: Warning
- Defined in:
- lib/eturem/warning.rb
Class Method Summary collapse
Class Method Details
.warn(*message) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/eturem/warning.rb', line 2 def self.warn(*) = .map do |mes| if mes.force_encoding("utf-8").match(/^(.+?):(\d+):\s*warning:\s*/) path, lineno, warning = $1, $2.to_i, $'.strip path = Eturem.program_name if path == File.(Eturem.program_name) str = Eturem::Base.(path, lineno, warning) end str || mes end super(*) end |