re_duxml 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/re_duxml/evaluate.rb +3 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3d5fa8b77a1b0b291c282574fc9a17cbd1e0de6
4
- data.tar.gz: 9e29841defd5a865ce9644da31f58b6dfc1f955a
3
+ metadata.gz: d7aa0ff7e9837f2d3564fc91b0c94eba1e2273bc
4
+ data.tar.gz: 13885673bdf57e816f0cc1e38a57b35b0265d3c6
5
5
  SHA512:
6
- metadata.gz: 55ef6a539b7887e2b23055cb7e1ad8f751fc7661d2f91d92e095238ddb8c834580097311a837e77594d7f4e998033048e1ff91bd212526a00c89b449a06297ee
7
- data.tar.gz: 4f89848c40a34c56fd6ee9545ff5bbb2d5bd2c0b6d290f42d94669e5016772cccd94d5136ccec3ab869b07909be4e6d0365a581332a44a159cb0452e751ba010
6
+ metadata.gz: 19f5fe9ee8263f095be0bae588087b814c481efc68150337bf75e03fbe506385b9ec9a0220e3a09f20b2da7248a942574d9f2090c42436334e6b90769416573c
7
+ data.tar.gz: 115cc0f537aa035d1ad605df26d5355b3a4b403ae06813dba067024a9ef48d495182903ed83516d558539d6d80485cf1632aea16d694a057ec7d9ce75780ef52
@@ -42,7 +42,9 @@ module ReDuxml
42
42
 
43
43
  def resolve_params(_expr)
44
44
  expr = _expr.dup
45
- param_hash.each do |param, val| expr.gsub!(param.to_s, val.to_s) end
45
+ param_hash.keys.sort_by do |key| -key.size end.each do |key|
46
+ expr.gsub!(key.to_s, param_hash[key].to_s)
47
+ end
46
48
  expr
47
49
  end
48
50
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: re_duxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Kong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-26 00:00:00.000000000 Z
11
+ date: 2017-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: duxml