ruby_parser 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ruby_parser might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/History.txt +13 -0
- data/lib/ruby_lexer.rb +3 -4
- data/lib/ruby_parser.rb +2502 -2511
- data/lib/ruby_parser.y +7 -4
- data/lib/ruby_parser_extras.rb +155 -155
- data/test/test_ruby_parser.rb +65 -0
- data/test/test_ruby_parser_extras.rb +7 -6
- metadata +11 -11
- metadata.gz.sig +0 -0
@@ -3,8 +3,13 @@ require 'minitest/autorun'
|
|
3
3
|
require 'ruby_parser_extras'
|
4
4
|
|
5
5
|
class TestStackState < MiniTest::Unit::TestCase
|
6
|
+
attr_reader :s
|
7
|
+
|
8
|
+
def setup
|
9
|
+
@s = RubyParser::StackState.new :test
|
10
|
+
end
|
11
|
+
|
6
12
|
def test_stack_state
|
7
|
-
s = StackState.new :test
|
8
13
|
s.push true
|
9
14
|
s.push false
|
10
15
|
s.lexpop
|
@@ -12,7 +17,6 @@ class TestStackState < MiniTest::Unit::TestCase
|
|
12
17
|
end
|
13
18
|
|
14
19
|
def test_is_in_state
|
15
|
-
s = StackState.new :test
|
16
20
|
assert_equal false, s.is_in_state
|
17
21
|
s.push false
|
18
22
|
assert_equal false, s.is_in_state
|
@@ -23,7 +27,6 @@ class TestStackState < MiniTest::Unit::TestCase
|
|
23
27
|
end
|
24
28
|
|
25
29
|
def test_lexpop
|
26
|
-
s = StackState.new :test
|
27
30
|
assert_equal [false], s.stack
|
28
31
|
s.push true
|
29
32
|
s.push false
|
@@ -33,7 +36,6 @@ class TestStackState < MiniTest::Unit::TestCase
|
|
33
36
|
end
|
34
37
|
|
35
38
|
def test_pop
|
36
|
-
s = StackState.new :test
|
37
39
|
assert_equal [false], s.stack
|
38
40
|
s.push true
|
39
41
|
assert_equal [false, true], s.stack
|
@@ -42,7 +44,6 @@ class TestStackState < MiniTest::Unit::TestCase
|
|
42
44
|
end
|
43
45
|
|
44
46
|
def test_push
|
45
|
-
s = StackState.new :test
|
46
47
|
assert_equal [false], s.stack
|
47
48
|
s.push true
|
48
49
|
s.push false
|
@@ -56,7 +57,7 @@ class TestEnvironment < MiniTest::Unit::TestCase
|
|
56
57
|
end
|
57
58
|
|
58
59
|
def setup
|
59
|
-
@env = Environment.new
|
60
|
+
@env = RubyParser::Environment.new
|
60
61
|
@env[:blah] = 42
|
61
62
|
assert_equal 42, @env[:blah]
|
62
63
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 2.
|
10
|
+
version: 2.2.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: 2011-08-
|
39
|
+
date: 2011-08-23 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sexp_processor
|
@@ -77,11 +77,11 @@ dependencies:
|
|
77
77
|
requirements:
|
78
78
|
- - ~>
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
hash:
|
80
|
+
hash: 9
|
81
81
|
segments:
|
82
82
|
- 2
|
83
|
-
-
|
84
|
-
version: "2.
|
83
|
+
- 5
|
84
|
+
version: "2.5"
|
85
85
|
type: :development
|
86
86
|
version_requirements: *id003
|
87
87
|
- !ruby/object:Gem::Dependency
|
@@ -92,11 +92,11 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - ~>
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
hash:
|
95
|
+
hash: 27
|
96
96
|
segments:
|
97
97
|
- 2
|
98
|
-
-
|
99
|
-
version: "2.
|
98
|
+
- 12
|
99
|
+
version: "2.12"
|
100
100
|
type: :development
|
101
101
|
version_requirements: *id004
|
102
102
|
description: |-
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements: []
|
182
182
|
|
183
183
|
rubyforge_project: parsetree
|
184
|
-
rubygems_version: 1.8.
|
184
|
+
rubygems_version: 1.8.8
|
185
185
|
signing_key:
|
186
186
|
specification_version: 3
|
187
187
|
summary: ruby_parser (RP) is a ruby parser written in pure ruby (utilizing racc--which does by default use a C extension)
|
metadata.gz.sig
CHANGED
Binary file
|