sexp_processor 3.0.10 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,8 +1,17 @@
1
+ === 3.1.0 / 2012-02-29
2
+
3
+ * 4 minor enhancements:
4
+
5
+ * Added test_call_arglist_trailing_comma__19 (presidentbeef)
6
+ * Added test_fcall_inside_parens. (presidentbeef)
7
+ * Added test_if_args_no_space_symbol__18. (presidentbeef)
8
+ * Added tests for new hash syntax and ternaries in 1.9 (lastobelus)
9
+
1
10
  === 3.0.10 / 2012-01-04
2
11
 
3
12
  * 1 minor enhancement:
4
13
 
5
- * Add test for bare hash at end of array in 1.9. (presidentbeef)
14
+ * Added test for bare hash at end of array in 1.9. (presidentbeef)
6
15
 
7
16
  * 1 bug fix:
8
17
 
data/lib/pt_testcase.rb CHANGED
@@ -854,6 +854,26 @@ class ParseTreeTestCase < MiniTest::Unit::TestCase
854
854
  "RawParseTree" => [:call, nil, :foo, [:array, [:lit, :bar]]],
855
855
  "ParseTree" => s(:call, nil, :foo, s(:arglist, s(:lit, :bar))))
856
856
 
857
+ add_tests("ternary_symbol_no_spaces",
858
+ "Ruby" => "1?:x:1",
859
+ "RawParseTree" => [:if, [:lit, 1], [:lit, :x], [:lit, 1]],
860
+ "ParseTree" => s(:if, s(:lit, 1), s(:lit, :x), s(:lit, 1)))
861
+
862
+ add_19tests("label_in_callargs_in_ternary",
863
+ "Ruby" => "1 ? m(a: 2) : 1",
864
+ "RawParseTree" => [:if, [:lit, 1], [:call, :nil, :m, [:array, [:hash, [:lit, :a], [:lit, 1]]]], [:lit, 1]],
865
+ "ParseTree" => s(:if, s(:lit, 1), s(:call, nil, :m, s(:arglist, s(:hash, s(:lit, :a), s(:lit, 2)))), s(:lit, 1)))
866
+
867
+ add_19tests("label_in_bare_hash_in_array_in_ternary",
868
+ "Ruby" => "1 ? [:a, b: 2] : 1",
869
+ "RawParseTree" => [:if, [:array, [:lit, :a], [:hash, [:lit, :b], [:lit, 2]]], [:lit, 1]],
870
+ "ParseTree" => s(:if, s(:lit, 1), s(:array, s(:lit, :a), s(:hash, s(:lit, :b), s(:lit, 2))), s(:lit, 1)))
871
+
872
+ add_tests("ternary_object_no_spaces",
873
+ "Ruby" => "1 ?o:1",
874
+ "RawParseTree" => [:if, [:lit, 1], [:vcall, :o], [:lit, 1]],
875
+ "ParseTree" => s(:if, s(:lit, 1), s(:call, nil, :o, s(:arglist)), s(:lit, 1)))
876
+
857
877
  add_tests("ternary_nil_no_space",
858
878
  "Ruby" => "1 ? nil: 1",
859
879
  "RawParseTree" => [:if, [:lit, 1], [:nil], [:lit, 1]],
@@ -2303,6 +2323,13 @@ class ParseTreeTestCase < MiniTest::Unit::TestCase
2303
2323
  s(:call, nil, :block_given?, s(:arglist)),
2304
2324
  s(:lit, 42), nil))
2305
2325
 
2326
+ add_tests("fcall_inside_parens",
2327
+ "Ruby" => "( c (d), e)",
2328
+ "ParseTree" => s(:call,
2329
+ nil,
2330
+ :c,
2331
+ s(:arglist, s(:call, nil, :d, s(:arglist)), s(:call, nil, :e, s(:arglist)))))
2332
+
2306
2333
  add_tests("flip2",
2307
2334
  "Ruby" => "x = if ((i % 4) == 0)..((i % 3) == 0) then\n i\nelse\n nil\nend",
2308
2335
  "RawParseTree" => [:lasgn,
@@ -4436,6 +4463,13 @@ class ParseTreeTestCase < MiniTest::Unit::TestCase
4436
4463
  "ParseTree" => s(:defn, :x, s(:args),
4437
4464
  s(:scope, s(:block, s(:zsuper)))))
4438
4465
 
4466
+ add_18tests("if_args_no_space_symbol",
4467
+ "Ruby" => "x if y:z",
4468
+ "ParseTree" => s(:if,
4469
+ s(:call, nil, :y, s(:arglist, s(:lit, :z))),
4470
+ s(:call, nil, :x, s(:arglist)),
4471
+ nil))
4472
+
4439
4473
  add_18tests("iter_args_ivar",
4440
4474
  "Ruby" => "a { |@a| 42 }",
4441
4475
  "RawParseTree" => [:iter,
@@ -4487,6 +4521,14 @@ class ParseTreeTestCase < MiniTest::Unit::TestCase
4487
4521
  s(:lit, :b),
4488
4522
  s(:lit, :c))))
4489
4523
 
4524
+ add_19tests("array_bare_hash_labels",
4525
+ "Ruby" => "[:a, b: :c]",
4526
+ "ParseTree" => s(:array,
4527
+ s(:lit, :a),
4528
+ s(:hash,
4529
+ s(:lit, :b),
4530
+ s(:lit, :c))))
4531
+
4490
4532
  add_19tests("call_arglist_norm_hash_colons",
4491
4533
  "Ruby" => "o.m(42, a: 1, b: 2)",
4492
4534
  "RawParseTree" => [:call,
@@ -4505,6 +4547,12 @@ class ParseTreeTestCase < MiniTest::Unit::TestCase
4505
4547
  s(:lit, :a), s(:lit, 1),
4506
4548
  s(:lit, :b), s(:lit, 2)))))
4507
4549
 
4550
+ add_19tests("call_arglist_trailing_comma",
4551
+ "Ruby" => "a(1,2,3,)",
4552
+ "ParseTree" => s(:call, nil, :a,
4553
+ s(:arglist,
4554
+ s(:lit, 1), s(:lit, 2), s(:lit, 3))))
4555
+
4508
4556
  add_19tests("call_not_equal",
4509
4557
  "Ruby" => "a != b",
4510
4558
  "RawParseTree" => [:call, [:vcall, :a], :"!=",
@@ -34,7 +34,7 @@ require 'sexp'
34
34
 
35
35
  class SexpProcessor
36
36
 
37
- VERSION = '3.0.10'
37
+ VERSION = '3.1.0'
38
38
 
39
39
  ##
40
40
  # Automatically shifts off the Sexp type before handing the
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sexp_processor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
+ - 1
8
9
  - 0
9
- - 10
10
- version: 3.0.10
10
+ version: 3.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -36,7 +36,7 @@ cert_chain:
36
36
  FBHgymkyj/AOSqKRIpXPhjC6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2012-01-05 00:00:00 Z
39
+ date: 2012-03-01 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
@@ -46,11 +46,11 @@ dependencies:
46
46
  requirements:
47
47
  - - ~>
48
48
  - !ruby/object:Gem::Version
49
- hash: 17
49
+ hash: 21
50
50
  segments:
51
51
  - 2
52
- - 9
53
- version: "2.9"
52
+ - 11
53
+ version: "2.11"
54
54
  type: :development
55
55
  version_requirements: *id001
56
56
  - !ruby/object:Gem::Dependency
@@ -76,11 +76,11 @@ dependencies:
76
76
  requirements:
77
77
  - - ~>
78
78
  - !ruby/object:Gem::Version
79
- hash: 27
79
+ hash: 29
80
80
  segments:
81
81
  - 2
82
- - 12
83
- version: "2.12"
82
+ - 15
83
+ version: "2.15"
84
84
  type: :development
85
85
  version_requirements: *id003
86
86
  description: |-
metadata.gz.sig CHANGED
Binary file