raka 0.5.0 → 0.6.0

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/raka/token.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8d1e99a862ad8d34b330ee50d92afdbf3c6aa11c8111621213e5794dd18830c
4
- data.tar.gz: ac8a414a0bb4e0830aea306d80901370efdf77a4a9a9ddc159d79869f0a95410
3
+ metadata.gz: c9181e13ec5517b0c40faba8c2e121a9b44c9da29de439bd5303d8fa5ee50870
4
+ data.tar.gz: a4c9f8d7e03f067f8266cf77cef52b2d153111c3b24c13a37f9927fe5b543fe5
5
5
  SHA512:
6
- metadata.gz: a9163e4fb93266b5ba646fd21f88c75d85a321e20aa0cb6e55ccb331aa41f4722d3695b8af126c77f3857ffd7240966a55e7b4c16c908bd5c8471b30b9da7265
7
- data.tar.gz: 4221dc18f6a1b03799d519df61c80828fd9f4b25353a22eee076f97959a25865224145f7403d5f05988394170b0d69be15720b9bcb6df1b7c3039b51b4d19d19
6
+ metadata.gz: 03cfe492010d2621bd84aa0c03f452be71de1d26d1d1e354a608893dca47d512ad666a42fb1c0e1d7b89522ad60acbcdd77a9466da388917a6992c9c9afbc8cd
7
+ data.tar.gz: f5f1d930083bf7342cac0285ba625219f6eb24fea7e1d61241e81bceda711a49496fa58b899de89759573143671adc74f142c730cfe7343b3663855ca91fcc1a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.6.0
data/lib/raka/token.rb CHANGED
@@ -157,12 +157,12 @@ class Token
157
157
  symbol = @chain.pop.to_s
158
158
  # if the pattern contains child pattern like percent_(\d+), we change the capture to
159
159
  # named capture so that it can be captured later. The name is symbol with the index, like func0
160
- pattern = pattern.gsub(/\(\S+?\)/).with_index { |m, i| "(?<#{symbol}#{i}>#{m})" }
160
+ pattern = pattern.to_s.gsub(/\(\S+?\)/).with_index { |m, i| "(?<#{symbol}#{i}>#{m})" }
161
161
 
162
162
  # if the symbol is _, \S+ will be put in chain, it indicates not to capture,
163
163
  # so just replace it with the refined pattern
164
164
  if symbol == Pattern::ANY # match-everything and not bound
165
- @chain.push pattern.to_s
165
+ @chain.push "#{pattern}\\w*"
166
166
  else
167
167
  @chain.push "(?<#{symbol}>(#{pattern}\\w*))"
168
168
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yarray