From 3c1c5106ccc3e45d9ab791458a53a252497d0203 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Mon, 14 Sep 2015 11:29:10 +0300 Subject: Fix new line removal Probably the intention was cfg.each_line.to_a[1..-3].map(&:rstrip).join("\n") But as it's just incorrectly removed new line from last line, clearly the rstrip has not been needed, so not gonna add it unless proven that it's needed. Spotted by @nickhilliard --- lib/oxidized/model/xos.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/xos.rb b/lib/oxidized/model/xos.rb index 88c81ed..309340f 100644 --- a/lib/oxidized/model/xos.rb +++ b/lib/oxidized/model/xos.rb @@ -6,7 +6,7 @@ class XOS < Oxidized::Model comment '# ' cmd :all do |cfg| - cfg.each_line.to_a[1..-2].join.rstrip + cfg.each_line.to_a[1..-2].join end cmd 'show version' do |cfg| -- cgit v1.2.1