summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2015-09-14 11:29:10 +0300
committerSaku Ytti <saku@ytti.fi>2015-09-14 11:29:10 +0300
commit3c1c5106ccc3e45d9ab791458a53a252497d0203 (patch)
tree0d1c87520d239fa3eea74c166c4e12785ff1ae04
parentc0a00892128562d1c78cce9d8cbc58b723ab4ba7 (diff)
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
-rw-r--r--lib/oxidized/model/xos.rb2
1 files changed, 1 insertions, 1 deletions
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|