live_ast 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.rdoc +4 -0
- data/devel/levitate.rb +0 -1
- data/lib/live_ast/version.rb +1 -1
- data/test/singleton_test.rb +25 -0
- metadata +4 -5
data/CHANGES.rdoc
CHANGED
data/devel/levitate.rb
CHANGED
data/lib/live_ast/version.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative 'main'
|
2
|
+
|
3
|
+
class SingletonTest < RegularTest
|
4
|
+
class A
|
5
|
+
def self.f
|
6
|
+
"A.f"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_self_dot
|
11
|
+
expected = singleton_no_arg_def(:f, "A.f")
|
12
|
+
assert_equal expected, A.method(:f).to_ast
|
13
|
+
end
|
14
|
+
|
15
|
+
class B
|
16
|
+
def B.f(x, y)
|
17
|
+
x + y
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_name_dot
|
22
|
+
expected = singleton_binop_def(:B, :f, :+)
|
23
|
+
assert_equal expected, B.method(:f).to_ast
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: live_ast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- James M. Lawrence
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-05-18 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: live_ast_ruby_parser
|
@@ -96,12 +95,12 @@ files:
|
|
96
95
|
- test/replace_eval_test.rb
|
97
96
|
- test/rubygems_test.rb
|
98
97
|
- test/rubyspec_test.rb
|
98
|
+
- test/singleton_test.rb
|
99
99
|
- test/stdlib_test.rb
|
100
100
|
- test/thread_test.rb
|
101
101
|
- test/to_ast_feature_test.rb
|
102
102
|
- test/to_ruby_feature_test.rb
|
103
103
|
- test/to_ruby_test.rb
|
104
|
-
has_rdoc: true
|
105
104
|
homepage: http://quix.github.com/live_ast
|
106
105
|
licenses: []
|
107
106
|
|
@@ -155,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
154
|
requirements: []
|
156
155
|
|
157
156
|
rubyforge_project:
|
158
|
-
rubygems_version: 1.
|
157
|
+
rubygems_version: 1.7.1
|
159
158
|
signing_key:
|
160
159
|
specification_version: 3
|
161
160
|
summary: Live abstract syntax trees of methods and procs.
|