synvert-core 0.54.2 → 0.54.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d76620f06a4691e9d494c0b8cdcca0906652f1bdf9e4c977085c9d649a272c3e
4
- data.tar.gz: 7f6ef2fdc13be57264052f8a231fce3f33682f14234a13e520548190895ecb5c
3
+ metadata.gz: f668f4f483fc617cfd11bf3e8cc786fc390316a160c8b7f64b9fdb034d639797
4
+ data.tar.gz: 8beb643a216285270c886d90e0057cf4b44c3e2b20b1d558dada21700461b84e
5
5
  SHA512:
6
- metadata.gz: 592a9feb14d4f773c4e474af198c42e31418343fd84eab1851e41231c99ccc288efc968a7af082060546448069f6bd92058e81a621abd192f3f6fbedbfa84be7
7
- data.tar.gz: a06e8ec70349dbf60026488700bdbd6acc2df2bcfe5cc795a208b6c30078cb18c2c78435f34c71593e9bc8623ab555d2c2caf97047a75435e820ca81b9121c37
6
+ metadata.gz: d1a0ec10d76c9dfcc400ee3342504a3b4617d49681eccacf464dab47b5344504f4e5d83161a853f6a96f36187d6b6b9f6d58abbc3deb1de93f42a10b6d8adc29
7
+ data.tar.gz: 7308355c918ccb01446fd4d2d74d8a14d9ea3817db2b71fc1745ab6aae6b49f8d9180910e5f786fccaf548a6e4f64d09b5b8c4b033d15c3509cfcba3119f21e3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.54.3 (2021-09-09)
4
+
5
+ * Fix remove action `begin_pos` and `end_pos`
6
+
3
7
  ## 0.54.2 (2021-09-09)
4
8
 
5
9
  * Fix `nil` match
@@ -41,11 +41,13 @@ module Synvert::Core
41
41
  end
42
42
 
43
43
  def start_index
44
- file_source[0..@node.loc.expression.begin_pos].rindex("\n") + "\n".length
44
+ index = file_source[0..@node.loc.expression.begin_pos].rindex("\n")
45
+ index ? index + "\n".length : @node.loc.expression.begin_pos
45
46
  end
46
47
 
47
48
  def end_index
48
- file_source[@node.loc.expression.end_pos..-1].index("\n") + @node.loc.expression.end_pos + "\n".length
49
+ index = file_source[@node.loc.expression.end_pos..-1].index("\n")
50
+ index ? @node.loc.expression.end_pos + index + "\n".length : @node.loc.expression.end_pos
49
51
  end
50
52
 
51
53
  def file_source
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Synvert
4
4
  module Core
5
- VERSION = '0.54.2'
5
+ VERSION = '0.54.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synvert-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.54.2
4
+ version: 0.54.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang