ripper_ruby_parser 1.4.0 → 1.4.1

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: 4a4cdc97eb0ffc630d78101fbd5ec056919c03bd91571a27d5972f6b67794dbf
4
- data.tar.gz: 192aa89ab393bfaa24690b4db77368cd608dd44de41575e2223d8936628f95c2
3
+ metadata.gz: f75852f6918c25ff33b1edfdd19ed7dc6e09662dd5786b37afe5cc900433db6b
4
+ data.tar.gz: 1f8b9b066b7dff6170ba7a1c0487a474314a1c67e8d5b63c3720aae4ae498775
5
5
  SHA512:
6
- metadata.gz: 8c44761bbf0e73e5c37a14ed1744639938d1e0e50f100735937f6727677224ef3f065a81a711246375a31df55394e7f2e0dd7a996a474a8c24dc3e01319b05f1
7
- data.tar.gz: 6fed83fa681eb454030522d362bc7d0b5904d061331b659f695f5b668cb5124f94ad5aafe1dfa7ee21387cf5d292e72403aab27aa9daa5d99b7003026e712896
6
+ metadata.gz: 040b94d89f959fdab917a244cea6649d27dbf1f9fa390753f09b025f6feac6778425a154592d9f252b1f60d28473865e78f6e993d6ba75658cd8d67aeed95d53
7
+ data.tar.gz: 0d947570348eb461628a027200ad456968261980925087915c9b7ec7f281ec9e789b3d9facf03090f7cecf3f879e4e7fcf1a1ff41a259fb036737d371d6a31e1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.1 / 2018-03-31
4
+
5
+ * Properly pop delimiter stack after parsing a symbol
6
+
3
7
  ## 1.4.0 / 2018-03-30
4
8
 
5
9
  * Handle begin..end blocks with postfix conditionals
@@ -265,6 +265,7 @@ module RipperRubyParser
265
265
  end
266
266
 
267
267
  def on_symbol(*args)
268
+ @delimiter_stack.pop
268
269
  @in_symbol = false
269
270
  super
270
271
  end
@@ -1,3 +1,3 @@
1
1
  module RipperRubyParser
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.4.1'.freeze
3
3
  end
@@ -284,14 +284,6 @@ describe RipperRubyParser::Parser do
284
284
  s(:evstr, s(:call, nil, :qux)))
285
285
  end
286
286
 
287
- it 'works for strings with interpolations followed by escape sequences' do
288
- '"#{foo}\\n"'.
289
- must_be_parsed_as s(:dstr,
290
- '',
291
- s(:evstr, s(:call, nil, :foo)),
292
- s(:str, "\n"))
293
- end
294
-
295
287
  it 'works with an empty interpolation' do
296
288
  "\"foo\#{}bar\"".
297
289
  must_be_parsed_as s(:dstr,
@@ -302,6 +294,24 @@ describe RipperRubyParser::Parser do
302
294
  end
303
295
  end
304
296
 
297
+ describe 'with interpolations and escape sequences' do
298
+ it 'works when interpolations are followed by escape sequences' do
299
+ '"#{foo}\\n"'.
300
+ must_be_parsed_as s(:dstr,
301
+ '',
302
+ s(:evstr, s(:call, nil, :foo)),
303
+ s(:str, "\n"))
304
+ end
305
+
306
+ it 'works when interpolations contain a mix of other string-like literals' do
307
+ '"#{[:foo, \'bar\']}\\n"'.
308
+ must_be_parsed_as s(:dstr,
309
+ '',
310
+ s(:evstr, s(:array, s(:lit, :foo), s(:str, 'bar'))),
311
+ s(:str, "\n"))
312
+ end
313
+ end
314
+
305
315
  describe 'with single quoted strings' do
306
316
  it 'works with escaped single quotes' do
307
317
  "'foo\\'bar'".
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripper_ruby_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-30 00:00:00.000000000 Z
11
+ date: 2018-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sexp_processor