rubocop-ast 0.4.1 → 0.4.2

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: 4bf5651a5da2be43d773d152c2f2260dfd1850ce1075aca7c4d21c08dd31a92a
4
- data.tar.gz: c9addcd67e29e797109dc2f523c9c2094f94908b40c2e60c56061d6a8bf0e0f5
3
+ metadata.gz: 40c38e6b0706f9e32534f937c63364ea14265677769db826355eb0b7e54e23fb
4
+ data.tar.gz: 1ea90e49f444e46fdbb998c5689fb711fda71ab6762462358210d8ee1e0494af
5
5
  SHA512:
6
- metadata.gz: 1aa33edeacd95a65468093b80248a5908c69d30bf7d19afd6141044d00830f31c12aa489caf8ef705364d63771cade73651d9697635ab22941137df467ce4e92
7
- data.tar.gz: fb820b52d69df72ab17a5ee06d06bdf7256b3318d8094b96467f79d314bad1b52bcb3938cb2ef98ca07b300f56132ac14921ef24aadf299d4c5754bb118b119f
6
+ metadata.gz: cea177a8e7e1a8ee9435fd00788f7ffec664e8b0de29c8fc390ccbbcb211aab5fc834ffdb84d6b05a94075f9d2e6c31aadeb8e43a91e0e5c7f1a8726da186c64
7
+ data.tar.gz: 8b7e38a8f92d84b22bfeac82efb5352d318a8663aecd97c1b9519fb065f6327136a19ce504ba7a75b9b3839ec1ac846c45ec52d414fdd292eebcf615db3ae79d
@@ -269,7 +269,8 @@ module RuboCop
269
269
  # is passed as a method argument. In this case tokens are interleaved by
270
270
  # heredoc contents' tokens.
271
271
  def sorted_tokens
272
- @sorted_tokens ||= tokens.sort_by(&:begin_pos)
272
+ # Use stable sort.
273
+ @sorted_tokens ||= tokens.sort_by.with_index { |token, i| [token.begin_pos, i] }
273
274
  end
274
275
 
275
276
  def source_range(range_or_node)
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '0.4.1'
6
+ STRING = '0.4.2'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-16 00:00:00.000000000 Z
13
+ date: 2020-09-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: parser