sexp_processor 4.4.3 → 4.4.4

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: 9c847159418199e0c96895e23b28368b141320f9
4
- data.tar.gz: b19be09f312410655b8b3ed8feeb85990d8d0e6f
3
+ metadata.gz: ebcc78edd5d4fc9463a7dc219d1bd7016bcc3ab4
4
+ data.tar.gz: bbc520509e23beb95761bf6247b4f0c56e67e5fd
5
5
  SHA512:
6
- metadata.gz: f401eb92711cbed3f4227eb4c133442862d1eb8ef888fa64d87805dea7e80bf4b0cad4d9bad06bb80f3568ccfb8da3c8f1f320f474c7da77747dfa5afc3664a5
7
- data.tar.gz: b94d88a84a4aa15fc10eddb4a0c3f7aca5189696e235ff9c3ef6d6115e0d8707178368830aebf925a7723c6ed860b873fe53ca3e4ac809f187c3b7f47ff66b28
6
+ metadata.gz: 912bf4fe79f0808aa6a84e4bdbaf67a20cd8a5a208671a45dad8a613373402b2c6897fcb145aefc5bec6a66ba1b51d60acf064407bb627b4c381e571504df3c7
7
+ data.tar.gz: 9d8d0e494d6893b19f3331213ac06dc0126e19cb5eb9298cc25b61b9570253e7594aeb46e610ddd25bd437fe9714335cb0f47240e50ece9dce808efb074412ce
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 4.4.4 / 2014-08-14
2
+
3
+ * 1 bug fix:
4
+
5
+ * MethodBasedSexpProcessor#in_klass clears out the method_stack for the duration of the block.
6
+
1
7
  === 4.4.3 / 2014-03-24
2
8
 
3
9
  * 1 bug fix:
@@ -33,7 +33,7 @@ require 'sexp'
33
33
 
34
34
  class SexpProcessor
35
35
 
36
- VERSION = "4.4.3"
36
+ VERSION = "4.4.4"
37
37
 
38
38
  ##
39
39
  # Automatically shifts off the Sexp type before handing the
@@ -444,7 +444,10 @@ class MethodBasedSexpProcessor < SexpProcessor
444
444
  end
445
445
 
446
446
  @class_stack.unshift name
447
- yield
447
+
448
+ with_new_method_stack do
449
+ yield
450
+ end
448
451
  ensure
449
452
  @class_stack.shift
450
453
  end
@@ -467,7 +470,10 @@ class MethodBasedSexpProcessor < SexpProcessor
467
470
 
468
471
  def in_sklass
469
472
  @sclass.push true
470
- yield
473
+
474
+ with_new_method_stack do
475
+ yield
476
+ end
471
477
  ensure
472
478
  @sclass.pop
473
479
  end
@@ -601,6 +607,18 @@ class MethodBasedSexpProcessor < SexpProcessor
601
607
  def signature
602
608
  "#{klass_name}#{method_name}"
603
609
  end
610
+
611
+ ##
612
+ # Reset the method stack for the duration of the block. Used for
613
+ # class scoping.
614
+
615
+ def with_new_method_stack
616
+ old_method_stack, @method_stack = @method_stack, []
617
+
618
+ yield
619
+ ensure
620
+ @method_stack = old_method_stack
621
+ end
604
622
  end
605
623
 
606
624
  class Object
@@ -306,8 +306,11 @@ class TestMethodBasedSexpProcessor < Minitest::Test
306
306
  def test_in_klass
307
307
  assert_empty processor.class_stack
308
308
 
309
- processor.in_klass "xxx::yyy" do
310
- assert_equal ["xxx::yyy"], processor.class_stack
309
+ processor.in_method "method", "file", 42 do
310
+ processor.in_klass "xxx::yyy" do
311
+ assert_equal ["xxx::yyy"], processor.class_stack
312
+ assert_empty processor.method_stack
313
+ end
311
314
  end
312
315
 
313
316
  assert_empty processor.class_stack
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sexp_processor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.3
4
+ version: 4.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
30
  xx3n58i0lQkBE1EpKE0lFu/y
31
31
  -----END CERTIFICATE-----
32
- date: 2014-03-25 00:00:00.000000000 Z
32
+ date: 2014-08-15 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: minitest
@@ -37,14 +37,14 @@ dependencies:
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '5.3'
40
+ version: '5.4'
41
41
  type: :development
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '5.3'
47
+ version: '5.4'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rdoc
50
50
  requirement: !ruby/object:Gem::Requirement
@@ -65,14 +65,14 @@ dependencies:
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '3.9'
68
+ version: '3.12'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '3.9'
75
+ version: '3.12'
76
76
  description: |-
77
77
  sexp_processor branches from ParseTree bringing all the generic sexp
78
78
  processing tools with it. Sexp, SexpProcessor, Environment, etc... all
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubyforge_project: sexp_processor
124
+ rubyforge_project:
125
125
  rubygems_version: 2.2.1
126
126
  signing_key:
127
127
  specification_version: 4
metadata.gz.sig CHANGED
Binary file