parser 2.3.0.5 → 2.3.0.6

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
  SHA1:
3
- metadata.gz: 5f5323dd1c3baff2484da66bc48e788fddb6dd8e
4
- data.tar.gz: 7c604fd2f64eeeedc37b4154b3eab307093a108d
3
+ metadata.gz: ff5a785602415af9bb4752bc39eb9315b502f4bf
4
+ data.tar.gz: 611593226a424ad609a42b72e5cc79a2a3010043
5
5
  SHA512:
6
- metadata.gz: 92bd32ec6046d060f0310b7a33a103061d9c21b1b3b74e831de19314abfdca2cedae541a056cbad3f972f38dfdf0d118e096ef906d83b54c3e4faefdb2ad8be9
7
- data.tar.gz: 989e665aa9cdd33251358b2b0e8008b1a600018ede1ac73abde23151ebac6e95c4649148abfb35fb8d2b495f67a2e66f313a97d0f30e3f9ff7071a6974ce5873
6
+ metadata.gz: 051c85691ec47584262edb2477862918713d31e87f36c0ce3235a0f1eb7f14bf78c40cba6a8d5993281024231d666e77774becd71874c8c55fc6166d4d39ac20
7
+ data.tar.gz: af772a8dd0be6622896d24443fc2999e117645f8a67bee0d2d7179c601b4938d2a4055a70450b2771f23a770130aec36c7be339d4fcd740eba5971025567ec51
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ v2.3.0.6 (2016-02-14)
5
+ ---------------------
6
+
7
+ Bugs fixed:
8
+ * lexer.rl: fix EOF location (closes #273). (whitequark)
9
+
4
10
  v2.3.0.5 (2016-02-12)
5
11
  ---------------------
6
12
 
@@ -23,7 +29,7 @@ Bugs fixed:
23
29
  * Add :csend to Parser::Meta::NODE_TYPES (Markus Schirp)
24
30
  * lexer/dedenter: "\<\<x\n y\\n z\nx": don't dedent after escaped newline. (whitequark)
25
31
 
26
- v2.3.0.5 (2016-01-16)
32
+ v2.3.0.6 (2016-01-16)
27
33
  ---------------------
28
34
 
29
35
  v2.3.0.1 (2016-01-14)
@@ -288,7 +288,7 @@ class Parser::Lexer
288
288
  elsif @cs == klass.lex_error
289
289
  [ false, [ '$error'.freeze, range(p - 1, p) ] ]
290
290
  else
291
- eof = @source_pts.size + 1
291
+ eof = @source_pts.size
292
292
  [ false, [ '$eof'.freeze, range(eof, eof) ] ]
293
293
  end
294
294
  end
@@ -1,3 +1,3 @@
1
1
  module Parser
2
- VERSION = '2.3.0.5'
2
+ VERSION = '2.3.0.6'
3
3
  end
@@ -2426,6 +2426,13 @@ class TestLexer < Minitest::Test
2426
2426
  end
2427
2427
  end
2428
2428
 
2429
+ def test_eof
2430
+ assert_scanned("self",
2431
+ :kSELF, "self", [0, 4])
2432
+ assert_equal([false, ["$eof", Parser::Source::Range.new(@lex.source_buffer, 4, 4)]],
2433
+ @lex.advance)
2434
+ end
2435
+
2429
2436
  #
2430
2437
  # Test for 'fluent interface'
2431
2438
  #
@@ -3167,19 +3174,19 @@ class TestLexer < Minitest::Test
3167
3174
  :tSTRING, "\xE2\x80\x99", [0, 14])
3168
3175
 
3169
3176
  if defined?(Encoding)
3170
- assert_scanned(%q{"\xE2\x80\x99"}.force_encoding(Encoding::UTF_8),
3171
- :tSTRING, '’'.force_encoding(Encoding::UTF_8), [0, 14])
3172
- assert_scanned(%q{"\342\200\231"}.force_encoding(Encoding::UTF_8),
3173
- :tSTRING, '’'.force_encoding(Encoding::UTF_8), [0, 14])
3174
- assert_scanned(%q{"\M-b\C-\M-@\C-\M-Y"}.force_encoding(Encoding::UTF_8),
3175
- :tSTRING, '’'.force_encoding(Encoding::UTF_8), [0, 20])
3177
+ assert_scanned(utf(%q{"\xE2\x80\x99"}),
3178
+ :tSTRING, utf('’'), [0, 14])
3179
+ assert_scanned(utf(%q{"\342\200\231"}),
3180
+ :tSTRING, utf('’'), [0, 14])
3181
+ assert_scanned(utf(%q{"\M-b\C-\M-@\C-\M-Y"}),
3182
+ :tSTRING, utf('’'), [0, 20])
3176
3183
  end
3177
3184
  end
3178
3185
 
3179
3186
  def test_bug_string_utf_escape_noop
3180
3187
  if defined?(Encoding)
3181
- assert_scanned(%q{"\あ"}.force_encoding(Encoding::UTF_8),
3182
- :tSTRING, "あ".force_encoding(Encoding::UTF_8), [0, 4])
3188
+ assert_scanned(utf(%q{"\あ"}),
3189
+ :tSTRING, utf("あ"), [0, 4])
3183
3190
  end
3184
3191
  end
3185
3192
 
@@ -3190,8 +3197,8 @@ class TestLexer < Minitest::Test
3190
3197
  :tSTRING, "caf\xC3\xA9", [0, 7])
3191
3198
 
3192
3199
  if defined?(Encoding)
3193
- assert_scanned(%q{"café"}.force_encoding(Encoding::UTF_8),
3194
- :tSTRING, "café".force_encoding(Encoding::UTF_8), [0, 6])
3200
+ assert_scanned(utf(%q{"café"}),
3201
+ :tSTRING, utf("café"), [0, 6])
3195
3202
  end
3196
3203
  end
3197
3204
 
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.3.0.5
4
+ version: 2.3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - whitequark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-12 00:00:00.000000000 Z
11
+ date: 2016-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast