dynarex 1.0.7 → 1.0.8

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/dynarex.rb +2 -4
  2. metadata +1 -1
@@ -150,7 +150,7 @@ EOF
150
150
  # 'a' and 'a_split' just used for validation
151
151
  a = @format_mask.scan(/\[!\w+\]/)
152
152
  a_split = @format_mask.split(/\[!\w+\]/)
153
-
153
+
154
154
  if a.length == 2 and a_split[1].length == 1 then
155
155
  a2 = []
156
156
 
@@ -161,12 +161,10 @@ EOF
161
161
  a2 << "(.*)"
162
162
  t = a2.join
163
163
  else
164
+ # convert the format mask into a friendly reg exp string
164
165
  t = @format_mask.to_s.gsub(/\[!(\w+)\]/, '(.*)').sub(/\[/,'\[').sub(/\]/,'\]')
165
166
  end
166
167
 
167
- # convert the format mask into a friendly reg exp string
168
- t = @format_mask.to_s.gsub(/\[!(\w+)\]/, '(.*)').sub(/\[/,'\[').sub(/\]/,'\]')
169
-
170
168
  lines = buffer.strip.split(/\r?\n|\r(?!\n)/).map {|x|x.match(/#{t}/).captures}
171
169
 
172
170
  a = lines.map do|x|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors: []
7
7