parser 2.2.0 → 2.2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e046c7cf9b591ec808e574b34fa7c85f10cd599b
4
- data.tar.gz: 9e0b542f23cabecdee8c94ba746e4ab4e3a02da8
3
+ metadata.gz: f269b1e2401ffe3b9b35319fec5accc3378dfe5e
4
+ data.tar.gz: 66bff4c72a39532d0a008dc2c45bf597ec9a397a
5
5
  SHA512:
6
- metadata.gz: 7f3314d6d28f8ab85e19b4b8c88705e37f86be3d22c60788cf8d4c47ab0b0628a575bc30b9cf4a9218e733d2eaf717ac95d2f2f6ec84f60e62f0590168f40c98
7
- data.tar.gz: 79106682d33a882de101643d8258fa327c13ca94b06bdceef7c7a89af42f21a7d6e589aa2bc9bc4785a2d0eefe228513fba33e1fbdfd842c7788ad71b2c9946d
6
+ metadata.gz: c05ff7923a950a07a0b202a2a393e4bdc7bf4b8235d5e5517599fbc634b544b82fd24b1ce74e34ae0131d68c982fb7044af6428acd3f62aa580d1a038bb03b63
7
+ data.tar.gz: 19e74008c7cc99b59811266fd590db6870f6e52ce44077f0430d8a065efc44f0c5bab8b64b77ca3dc52cf431f8e59db7329be2f70dbf191a375e189be06bec11
@@ -5,13 +5,13 @@ rvm:
5
5
  - 1.9.3
6
6
  - 2.0.0
7
7
  - 2.1
8
+ - 2.2
8
9
  - ruby-head
9
10
  - jruby-18mode
10
11
  - jruby-19mode
11
12
  - rbx-2
12
13
  matrix:
13
14
  allow_failures:
14
- - rvm: ruby-head
15
15
  - rvm: rbx-2
16
16
  before_install:
17
17
  - gem update bundler
@@ -1,7 +1,14 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- v2.2.0 (2014-12-05)
4
+ v2.2.0.1 (2014-12-27)
5
+ ---------------------
6
+
7
+ Bugs fixed:
8
+ * lexer.rl, lexer/literal: "{'a'::": don't parse as quoted label. (Peter Zotov)
9
+ * Update syntax deviation warning to reflect 2.2 release. (Peter Zotov)
10
+
11
+ v2.2.0 (2014-12-25)
5
12
  -------------------
6
13
 
7
14
  Bugs fixed:
@@ -42,8 +42,8 @@ module Parser
42
42
 
43
43
  else # :nocov:
44
44
  # Keep this in sync with released Ruby.
45
- warn_syntax_deviation 'parser/ruby21', '2.1'
46
- require 'parser/ruby21'
47
- CurrentRuby = Ruby21
45
+ warn_syntax_deviation 'parser/ruby22', '2.2'
46
+ require 'parser/ruby22'
47
+ CurrentRuby = Ruby22
48
48
  end
49
49
  end
@@ -832,7 +832,7 @@ class Parser::Lexer
832
832
 
833
833
  # tLABEL_END is only possible in non-cond context on >= 2.2
834
834
  if @version >= 22 && !@cond.active?
835
- lookahead = @source[@te...@te+1]
835
+ lookahead = @source[@te...@te+2]
836
836
  lookahead = lookahead.encode(@encoding) if lookahead.respond_to?(:encode)
837
837
  end
838
838
 
@@ -129,11 +129,13 @@ module Parser
129
129
  extend_space(ts, ts)
130
130
  end
131
131
 
132
- # Emit the string as a single token if it's applicable.
133
- if lookahead == ':' && %w(' ").include?(delimiter) && @start_tok == :tSTRING_BEG
132
+ if lookahead && lookahead[0] == ?: && lookahead[1] != ?: &&
133
+ %w(' ").include?(delimiter) && @start_tok == :tSTRING_BEG
134
+ # This is a quoted label.
134
135
  flush_string
135
136
  emit(:tLABEL_END, @end_delim, ts, te + 1)
136
137
  elsif @monolithic
138
+ # Emit the string as a single token.
137
139
  emit(MONOLITHIC[@start_tok], @buffer, @str_s, te)
138
140
  else
139
141
  # If this is a heredoc, @buffer contains the sentinel now.
@@ -2329,9 +2329,6 @@ end
2329
2329
 
2330
2330
  require 'parser'
2331
2331
 
2332
- warn "warning: you are loading parser/ruby22 from #{caller[0]}."
2333
- warn "warning: Ruby 2.2 is not released yet and parser support may be incomplete."
2334
-
2335
2332
  Parser.check_for_encoding_support
2336
2333
 
2337
2334
  ---- inner
@@ -1,3 +1,3 @@
1
1
  module Parser
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.0.1'
3
3
  end
@@ -293,6 +293,15 @@ class TestLexer < Minitest::Test
293
293
  :tLABEL_END, "'")
294
294
  end
295
295
 
296
+ def test_label_colon2__22
297
+ setup_lexer 22
298
+
299
+ assert_scanned("{'a'::",
300
+ :tLBRACE, '{',
301
+ :tSTRING, "a",
302
+ :tCOLON2, '::')
303
+ end
304
+
296
305
  def test_command_start__19
297
306
  setup_lexer 19
298
307
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Zotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-25 00:00:00.000000000 Z
11
+ date: 2014-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast
@@ -371,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
371
  version: '0'
372
372
  requirements: []
373
373
  rubyforge_project:
374
- rubygems_version: 2.4.1
374
+ rubygems_version: 2.4.2
375
375
  signing_key:
376
376
  specification_version: 4
377
377
  summary: A Ruby parser written in pure Ruby.