[Why] we already use strip, so needn't chomp
Signed-off-by: Lu Weitao luweitaobe@163.com --- lib/dump_stat.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dump_stat.rb b/lib/dump_stat.rb index 383ff09..04a7632 100644 --- a/lib/dump_stat.rb +++ b/lib/dump_stat.rb @@ -38,7 +38,7 @@ module DumpStat
stat_result.each do |key, value| key = key.resolve_invalid_bytes - key = key.chomp.strip + key = key.strip next if key[0] == '#' next if value.empty? || value == 0 next if monitor =~ /^(dmesg|kmsg)$/ && key =~ /^(message|pattern):/