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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +6 -0
- data/lib/sexp_processor.rb +21 -3
- data/test/test_sexp_processor.rb +5 -2
- metadata +7 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebcc78edd5d4fc9463a7dc219d1bd7016bcc3ab4
|
4
|
+
data.tar.gz: bbc520509e23beb95761bf6247b4f0c56e67e5fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/sexp_processor.rb
CHANGED
@@ -33,7 +33,7 @@ require 'sexp'
|
|
33
33
|
|
34
34
|
class SexpProcessor
|
35
35
|
|
36
|
-
VERSION = "4.4.
|
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
|
-
|
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
|
-
|
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
|
data/test/test_sexp_processor.rb
CHANGED
@@ -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.
|
310
|
-
|
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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:
|
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
|