dynarex 0.7.5 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/dynarex.rb +2 -1
  2. metadata +1 -1
@@ -139,10 +139,11 @@ EOF
139
139
 
140
140
  def create_from_line(line)
141
141
  t = @format_mask.to_s.gsub(/\[!(\w+)\]/, '(.*)').sub(/\[/,'\[').sub(/\]/,'\]')
142
+ fields = @format_mask.to_s.scan(/\[!(\w+)\]/).flatten.map(&:to_sym)
142
143
  line.match(/#{t}/).captures
143
144
 
144
145
  a = line.match(/#{t}/).captures
145
- h = Hash[@fields.zip(a)]
146
+ h = Hash[fields.zip(a)]
146
147
  create h
147
148
  self
148
149
  end
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: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors: []
7
7