rxraw-lineparser 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rxraw-lineparser.rb +7 -3
  2. metadata +1 -1
@@ -90,9 +90,13 @@ class RXRawLineParser
90
90
 
91
91
  count = 2**main_fields
92
92
  rr2 = rr.take(count+1).map {|x| x + [a[-1] + '(.*)']}
93
- wild_r = rr2.slice!(-1)
94
-
95
- rrr = rr2 + rr[0..count-1] + [wild_r] + rr[count..-1]
93
+
94
+ if rr.length > 2 then
95
+ wild_r = rr2.slice!(-1)
96
+ rrr = rr2 + rr[0..count-1] + [wild_r] + rr[count..-1]
97
+ else
98
+ rrr = rr2 + rr[0..count-1] + rr[count..-1]
99
+ end
96
100
 
97
101
  end
98
102
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rxraw-lineparser
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson