yard 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yard might be problematic. Click here for more details.

Files changed (68) hide show
  1. data/README.md +14 -2
  2. data/Rakefile +5 -10
  3. data/benchmarks/parsing.rb +2 -2
  4. data/docs/WhatsNew.md +43 -5
  5. data/lib/rubygems_plugin.rb +49 -45
  6. data/lib/yard.rb +1 -1
  7. data/lib/yard/cli/base.rb +4 -0
  8. data/lib/yard/cli/yard_graph.rb +1 -0
  9. data/lib/yard/cli/yardoc.rb +24 -2
  10. data/lib/yard/cli/yri.rb +1 -0
  11. data/lib/yard/code_objects/base.rb +9 -0
  12. data/lib/yard/code_objects/class_object.rb +1 -1
  13. data/lib/yard/code_objects/method_object.rb +20 -4
  14. data/lib/yard/core_ext/file.rb +6 -0
  15. data/lib/yard/core_ext/hash.rb +1 -1
  16. data/lib/yard/core_ext/string.rb +3 -1
  17. data/lib/yard/handlers/ruby/attribute_handler.rb +22 -18
  18. data/lib/yard/handlers/ruby/legacy/attribute_handler.rb +21 -17
  19. data/lib/yard/handlers/ruby/legacy/method_handler.rb +8 -0
  20. data/lib/yard/handlers/ruby/method_handler.rb +8 -1
  21. data/lib/yard/logging.rb +1 -1
  22. data/lib/yard/parser/c_parser.rb +10 -17
  23. data/lib/yard/parser/ruby/legacy/statement_list.rb +7 -0
  24. data/lib/yard/parser/ruby/ruby_parser.rb +2 -1
  25. data/lib/yard/parser/source_parser.rb +20 -3
  26. data/lib/yard/templates/helpers/html_helper.rb +48 -22
  27. data/lib/yard/templates/template.rb +6 -1
  28. data/spec/cli/yardoc_spec.rb +22 -0
  29. data/spec/code_objects/base_spec.rb +34 -1
  30. data/spec/code_objects/method_object_spec.rb +35 -0
  31. data/spec/core_ext/hash_spec.rb +4 -0
  32. data/spec/core_ext/string_spec.rb +5 -1
  33. data/spec/handlers/attribute_handler_spec.rb +9 -1
  34. data/spec/handlers/examples/attribute_handler_001.rb.txt +8 -0
  35. data/spec/handlers/examples/method_handler_001.rb.txt +6 -0
  36. data/spec/handlers/method_handler_spec.rb +10 -0
  37. data/spec/parser/source_parser_spec.rb +29 -26
  38. data/spec/spec_helper.rb +1 -1
  39. data/spec/templates/engine_spec.rb +1 -0
  40. data/spec/templates/examples/class001.html +4 -0
  41. data/spec/templates/examples/class001.txt +5 -0
  42. data/spec/templates/examples/module001.dot +1 -1
  43. data/spec/templates/examples/module001.html +92 -12
  44. data/spec/templates/helpers/html_helper_spec.rb +25 -5
  45. data/spec/templates/module_spec.rb +3 -1
  46. data/spec/templates/template_spec.rb +11 -1
  47. data/templates/default/class/html/subclasses.erb +1 -1
  48. data/templates/default/class/setup.rb +10 -3
  49. data/templates/default/class/text/subclasses.erb +1 -1
  50. data/templates/default/fulldoc/html/css/full_list.css +38 -11
  51. data/templates/default/fulldoc/html/css/style.css +6 -1
  52. data/templates/default/fulldoc/html/frames.erb +13 -0
  53. data/templates/default/fulldoc/html/full_list.erb +20 -22
  54. data/templates/default/fulldoc/html/full_list_class.erb +2 -0
  55. data/templates/default/fulldoc/html/full_list_files.erb +5 -0
  56. data/templates/default/fulldoc/html/full_list_methods.erb +12 -0
  57. data/templates/default/fulldoc/html/js/app.js +10 -2
  58. data/templates/default/fulldoc/html/js/full_list.js +76 -9
  59. data/templates/default/fulldoc/html/setup.rb +37 -2
  60. data/templates/default/layout/html/breadcrumb.erb +3 -1
  61. data/templates/default/layout/html/layout.erb +4 -0
  62. data/templates/default/layout/html/search.erb +1 -1
  63. data/templates/default/layout/html/setup.rb +13 -2
  64. data/templates/default/module/dot/info.erb +1 -1
  65. data/templates/default/module/html/attribute_details.erb +1 -1
  66. data/templates/default/module/html/constant_summary.erb +1 -1
  67. data/templates/default/module/html/item_summary.erb +2 -2
  68. metadata +6 -2
@@ -99,7 +99,12 @@ module YARD
99
99
  pc = path.to_s.split('/')
100
100
  if pc.size > 1
101
101
  pc.pop
102
- include Engine.template!(pc.join('/'), full_path.gsub(%r{/[^/]+$}, ''))
102
+ pc = pc.join('/')
103
+ begin
104
+ include Engine.template(pc)
105
+ rescue ArgumentError
106
+ include Engine.template!(pc, full_path.gsub(%r{/[^/]+$}, ''))
107
+ end
103
108
  end
104
109
  end
105
110
 
@@ -6,6 +6,8 @@ describe YARD::CLI::Yardoc do
6
6
  before do
7
7
  @yardoc = YARD::CLI::Yardoc.new
8
8
  @yardoc.stub!(:generate).and_return(false)
9
+ Templates::Engine.stub!(:render)
10
+ Templates::Engine.stub!(:generate)
9
11
  YARD.stub!(:parse)
10
12
  end
11
13
 
@@ -129,4 +131,24 @@ describe YARD::CLI::Yardoc do
129
131
  @yardoc.optparse *%w( --hide-void-return )
130
132
  @yardoc.options[:hide_void_return].should be_true
131
133
  end
134
+
135
+ it "should generate all objects with --use-cache" do
136
+ YARD.should_receive(:parse)
137
+ Registry.should_receive(:load)
138
+ Registry.should_receive(:load_all)
139
+ @yardoc.stub!(:generate).and_return(true)
140
+ @yardoc.run *%w( --use-cache )
141
+ end
142
+
143
+ it "should only generate changed objects with --incremental" do
144
+ YARD.should_receive(:parse)
145
+ Registry.should_receive(:load)
146
+ Registry.should_not_receive(:load_all)
147
+ @yardoc.stub!(:generate).and_return(true)
148
+ @yardoc.should_receive(:generate_with_cache)
149
+ @yardoc.run *%w( --incremental )
150
+ @yardoc.incremental.should == true
151
+ @yardoc.use_cache.should == true
152
+ @yardoc.generate.should == true
153
+ end
132
154
  end
@@ -2,6 +2,11 @@ require File.dirname(__FILE__) + '/spec_helper'
2
2
 
3
3
  describe YARD::CodeObjects::Base do
4
4
  before { Registry.clear }
5
+
6
+ # Fix this
7
+ # it "should not allow empty object name" do
8
+ # lambda { Base.new(:root, '') }.should raise_error(ArgumentError)
9
+ # end
5
10
 
6
11
  it "should return a unique instance of any registered object" do
7
12
  obj = ClassObject.new(:root, :Me)
@@ -183,7 +188,7 @@ describe YARD::CodeObjects::Base do
183
188
 
184
189
  it "should maintain all file associations when objects are defined multiple times in multiple files" do
185
190
  3.times do |i|
186
- IO.stub!(:read).and_return("class X; end")
191
+ File.stub!(:read_binary).and_return("class X; end")
187
192
  Parser::SourceParser.new.parse("file#{i+1}.rb")
188
193
  end
189
194
 
@@ -219,4 +224,32 @@ describe YARD::CodeObjects::Base do
219
224
  object.source_type.should == :ruby
220
225
  end
221
226
  end
227
+
228
+ describe '#relative_path' do
229
+ it "should accept a string" do
230
+ YARD.parse_string "module A; class B; end; class C; end; end"
231
+ Registry.at('A::B').relative_path(Registry.at('A::C')).should ==
232
+ Registry.at('A::B').relative_path('A::C')
233
+ end
234
+
235
+ it "should return the relative path when they share a common namespace" do
236
+ YARD.parse_string "module A; class B; end; class C; end; end"
237
+ Registry.at('A::B').relative_path(Registry.at('A::C')).should == 'C'
238
+ end
239
+
240
+ it "should return the full path if they don't have a common namespace" do
241
+ YARD.parse_string "module A; class B; end; end; module D; class C; end; end"
242
+ Registry.at('A::B').relative_path('D::C').should == 'D::C'
243
+ end
244
+
245
+ it "should return a relative path for class methods" do
246
+ YARD.parse_string "module A; def self.b; end; def self.c; end; end"
247
+ Registry.at('A.b').relative_path('A.c').should == 'c'
248
+ end
249
+
250
+ it "should return a relative path for instance methods" do
251
+ YARD.parse_string "module A; def b; end; def c; end; end"
252
+ Registry.at('A#b').relative_path('A#c').should == '#c'
253
+ end
254
+ end
222
255
  end
@@ -65,6 +65,41 @@ describe YARD::CodeObjects::MethodObject do
65
65
  end
66
66
  end
67
67
 
68
+ describe '#attr_info' do
69
+ it "should return attribute info if namespace is available" do
70
+ obj = MethodObject.new(@yard, :foo)
71
+ @yard.attributes[:instance][:foo] = {:read => obj, :write => nil}
72
+ obj.attr_info.should == @yard.attributes[:instance][:foo]
73
+ end
74
+
75
+ it "should return nil if namespace is proxy" do
76
+ obj = MethodObject.new(P(:ProxyClass), :foo)
77
+ MethodObject.new(@yard, :foo).attr_info.should == nil
78
+ end
79
+
80
+ it "should return nil if meth is not an attribute" do
81
+ MethodObject.new(@yard, :notanattribute).attr_info.should == nil
82
+ end
83
+ end
84
+
85
+ describe '#writer?' do
86
+ it "should return true if method is a writer attribute" do
87
+ obj = MethodObject.new(@yard, :foo=)
88
+ @yard.attributes[:instance][:foo] = {:read => nil, :write => obj}
89
+ obj.writer?.should == true
90
+ MethodObject.new(@yard, :NOTfoo=).writer?.should == false
91
+ end
92
+ end
93
+
94
+ describe '#reader?' do
95
+ it "should return true if method is a reader attribute" do
96
+ obj = MethodObject.new(@yard, :foo)
97
+ @yard.attributes[:instance][:foo] = {:read => obj, :write => nil}
98
+ obj.reader?.should == true
99
+ MethodObject.new(@yard, :NOTfoo).reader?.should == false
100
+ end
101
+ end
102
+
68
103
  describe '#constructor?' do
69
104
  before { @class = ClassObject.new(:root, :MyClass) }
70
105
 
@@ -6,5 +6,9 @@ describe Hash do
6
6
  list = [['foo', 'bar'], ['foo2', 'bar2']]
7
7
  Hash[list].should == {'foo' => 'bar', 'foo2' => 'bar2'}
8
8
  end
9
+
10
+ it "should accept an array as a key" do
11
+ Hash[['a', 'b'], 1].should == {['a', 'b'] => 1}
12
+ end
9
13
  end
10
14
  end
@@ -20,7 +20,11 @@ describe String do
20
20
  end
21
21
 
22
22
  it "should turn hello/world into Hello::World" do
23
- "Hello::World".underscore.should == "hello/world"
23
+ "hello/world".camelcase.should == "Hello::World"
24
+ end
25
+
26
+ it "should not camelcase _foo" do
27
+ "_foo".camelcase.should == "_foo"
24
28
  end
25
29
  end
26
30
 
@@ -71,7 +71,7 @@ describe "YARD::Handlers::Ruby::#{RUBY18 ? "Legacy::" : ""}AttributeHandler" do
71
71
  end
72
72
 
73
73
  it "should not return true for #is_explicit? in created methods" do
74
- Registry.all(:method).each do |meth|
74
+ Registry.at(:B).meths.each do |meth|
75
75
  meth.is_explicit?.should == false
76
76
  end
77
77
  end
@@ -79,4 +79,12 @@ describe "YARD::Handlers::Ruby::#{RUBY18 ? "Legacy::" : ""}AttributeHandler" do
79
79
  it "should handle attr call with no arguments" do
80
80
  lambda { StubbedSourceParser.parse_string "attr" }.should_not raise_error
81
81
  end
82
+
83
+ it "should add existing reader method as part of attr_writer combo" do
84
+ Registry.at('C#foo=').attr_info[:read].should == Registry.at('C#foo')
85
+ end
86
+
87
+ it "should add existing writer method as part of attr_reader combo" do
88
+ Registry.at('C#foo').attr_info[:write].should == Registry.at('C#foo=')
89
+ end
82
90
  end
@@ -16,4 +16,12 @@ class B
16
16
  attr_accessor 'f'
17
17
 
18
18
  attr_accessor :z
19
+ end
20
+
21
+ class C
22
+ def foo; end
23
+ attr_writer :foo
24
+
25
+ def bar=(value); end
26
+ attr_reader :bar
19
27
  end
@@ -68,4 +68,10 @@ end
68
68
 
69
69
  # @return [NotBoolean, nil]
70
70
  def boolean3?; end
71
+
72
+ attr_writer :attr_name
73
+ def attr_name; end
74
+
75
+ attr_reader :attr_name2
76
+ def attr_name2=; end
71
77
  end
@@ -105,4 +105,14 @@ describe "YARD::Handlers::Ruby::#{RUBY18 ? "Legacy::" : ""}MethodHandler" do
105
105
  meth.should have_tag(:return)
106
106
  meth.tag(:return).types.should == ['NotBoolean', 'nil']
107
107
  end
108
+
109
+ it "should add method writer to existing attribute" do
110
+ Registry.at('Foo#attr_name').should be_reader
111
+ Registry.at('Foo#attr_name=').should be_writer
112
+ end
113
+
114
+ it "should add method reader to existing attribute" do
115
+ Registry.at('Foo#attr_name2').should be_reader
116
+ Registry.at('Foo#attr_name2=').should be_writer
117
+ end
108
118
  end
@@ -33,33 +33,29 @@ describe YARD::Parser::SourceParser do
33
33
  Registry.at(:Hello).docstring.should == "PASS"
34
34
  end
35
35
 
36
+ it "should not add comments appended to last line of block" do
37
+ YARD.parse_string <<-eof
38
+ module Hello2
39
+ end # FAIL
40
+ eof
41
+ Registry.at(:Hello2).docstring.should be_blank
42
+ end
43
+
36
44
  it "should add comments appended to an object's first line" do
37
45
  YARD.parse_string <<-eof
38
46
  module Hello # PASS
39
47
  HELLO
40
48
  end
41
- module Hello2
42
- end # FAIL
43
-
44
49
 
45
- module Hello3 # PASS
46
- # CANNOT DIFFERENTIATE
50
+ module Hello2 # PASS
51
+ # ANOTHER PASS
47
52
  def x; end
48
53
  end
49
54
  eof
50
55
 
51
- # TODO: unify behaviour
52
- if RUBY18
53
- Registry.at(:Hello).docstring.should == ""
54
- Registry.at(:Hello2).docstring.should == "FAIL"
55
- Registry.at(:Hello3).docstring.should == ""
56
- Registry.at('Hello3#x').docstring.should == "CANNOT DIFFERENTIATE"
57
- else
58
- Registry.at(:Hello).docstring.should == "PASS"
59
- Registry.at(:Hello2).docstring.should == ""
60
- Registry.at(:Hello3).docstring.should == ""
61
- Registry.at('Hello3#x').docstring.should == "PASS\nCANNOT DIFFERENTIATE"
62
- end
56
+ Registry.at(:Hello).docstring.should == "PASS"
57
+ Registry.at(:Hello2).docstring.should == "PASS"
58
+ Registry.at('Hello2#x').docstring.should == "ANOTHER PASS"
63
59
  end
64
60
  end
65
61
 
@@ -79,7 +75,7 @@ describe YARD::Parser::SourceParser do
79
75
  it "should parse a set of absolute paths" do
80
76
  Dir.should_not_receive(:[]).and_return([])
81
77
  File.should_receive(:file?).with('/path/to/file').and_return(true)
82
- IO.should_receive(:read).with('/path/to/file').and_return("")
78
+ File.should_receive(:read_binary).with('/path/to/file').and_return("")
83
79
  YARD.parse('/path/to/file')
84
80
  end
85
81
 
@@ -88,9 +84,9 @@ describe YARD::Parser::SourceParser do
88
84
  File.should_receive(:file?).with('/path/to/file').and_return(true)
89
85
  File.should_receive(:file?).with('a.rb').and_return(true)
90
86
  File.should_receive(:file?).with('b.rb').and_return(true)
91
- IO.should_receive(:read).with('/path/to/file').and_return("")
92
- IO.should_receive(:read).with('a.rb').and_return("")
93
- IO.should_receive(:read).with('b.rb').and_return("")
87
+ File.should_receive(:read_binary).with('/path/to/file').and_return("")
88
+ File.should_receive(:read_binary).with('a.rb').and_return("")
89
+ File.should_receive(:read_binary).with('b.rb').and_return("")
94
90
  YARD.parse ['/path/to/file', '*.rb']
95
91
  end
96
92
 
@@ -99,8 +95,8 @@ describe YARD::Parser::SourceParser do
99
95
  File.should_receive(:directory?).with('foo').and_return(true)
100
96
  File.should_receive(:file?).with('foo/a.rb').and_return(true)
101
97
  File.should_receive(:file?).with('foo/bar/b.rb').and_return(true)
102
- IO.should_receive(:read).with('foo/a.rb').and_return("")
103
- IO.should_receive(:read).with('foo/bar/b.rb').and_return("")
98
+ File.should_receive(:read_binary).with('foo/a.rb').and_return("")
99
+ File.should_receive(:read_binary).with('foo/bar/b.rb').and_return("")
104
100
  YARD.parse ['foo']
105
101
  end
106
102
 
@@ -111,15 +107,22 @@ describe YARD::Parser::SourceParser do
111
107
  cmock.should_receive(:[]).with('foo/bar').and_return(hash)
112
108
  Registry.should_receive(:checksums).and_return(cmock)
113
109
  File.should_receive(:file?).with('foo/bar').and_return(true)
114
- IO.should_receive(:read).with('foo/bar').and_return(data)
110
+ File.should_receive(:read_binary).with('foo/bar').and_return(data)
115
111
  YARD.parse('foo/bar')
116
112
  end
113
+
114
+ it "should support excluded paths" do
115
+ File.should_receive(:file?).with('foo/bar').and_return(true)
116
+ File.should_receive(:file?).with('foo/baz').and_return(true)
117
+ File.should_not_receive(:read_binary)
118
+ YARD.parse(["foo/bar", "foo/baz"], ["foo", /baz$/])
119
+ end
117
120
  end
118
121
 
119
122
  describe '#parse_in_order' do
120
123
  def in_order_parse(*files)
121
124
  paths = files.map {|f| File.join(File.dirname(__FILE__), 'examples', f.to_s + '.rb.txt') }
122
- YARD::Parser::SourceParser.parse(paths, Logger::DEBUG)
125
+ YARD::Parser::SourceParser.parse(paths, [], Logger::DEBUG)
123
126
  end
124
127
 
125
128
  it "should attempt to parse files in order" do
@@ -135,7 +138,7 @@ describe YARD::Parser::SourceParser do
135
138
  it "should attempt to order files by length (process toplevel files first)" do
136
139
  %w(a a/b a/b/c).each do |file|
137
140
  File.should_receive(:file?).with(file).and_return(true)
138
- IO.should_receive(:read).with(file).ordered.and_return('')
141
+ File.should_receive(:read_binary).with(file).ordered.and_return('')
139
142
  end
140
143
  YARD.parse %w(a/b/c a/b a)
141
144
  end
data/spec/spec_helper.rb CHANGED
@@ -6,7 +6,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'yard'))
6
6
  def parse_file(file, thisfile = __FILE__, log_level = log.level, ext = '.rb.txt')
7
7
  Registry.clear
8
8
  path = File.join(File.dirname(thisfile), 'examples', file.to_s + ext)
9
- YARD::Parser::SourceParser.parse(path, log_level)
9
+ YARD::Parser::SourceParser.parse(path, [], log_level)
10
10
  end
11
11
 
12
12
  def described_in_docs(klass, meth, file = nil)
@@ -48,6 +48,7 @@ describe YARD::Templates::Engine do
48
48
 
49
49
  it "should create a Template including other matching templates in path" do
50
50
  paths = ['/full/path/template/name', '/full/path2/template/name']
51
+ Engine.should_receive(:find_template_paths).with(nil, 'template').at_least(1).times.and_return([])
51
52
  Engine.should_receive(:find_template_paths).with(nil, 'template/name').and_return(paths)
52
53
  ancestors = Engine.template('template/name').ancestors.map {|m| m.class_name }
53
54
  ancestors.should include("Template__full_path2_template_name")
@@ -83,8 +83,12 @@ Comments
83
83
 
84
84
  </ul>
85
85
 
86
+ </div><div id="subclasses">
87
+ <h2>Direct Known Subclasses</h2>
88
+ <p class="children">C</p>
86
89
  </div>
87
90
 
91
+
88
92
 
89
93
 
90
94
  <h2>Instance Method Summary</h2>
@@ -23,6 +23,11 @@ Version:
23
23
 
24
24
  ------------------------------------------------------------------------
25
25
 
26
+ Direct Known Subclasses:
27
+ ------------------------
28
+
29
+ C
30
+
26
31
  Instance methods:
27
32
  -----------------
28
33
 
@@ -1,4 +1,4 @@
1
- A [label="{module A|+ \#attr1 [RW]\l+ \#attr2 [R]\l+ \#attr3 [RW]\l|+ a\l+ \#a\l+ \#test_multi_overload\l+ \#test_overload\l+ \#void_meth\ \:\ void\l}" rank=sink];
1
+ A [label="{module A|+ \#attr1 [RW]\l+ \#attr2 [R]\l+ \#attr3 [RW]\l+ \#attr4 [W]\l|+ a\l+ \#a\l+ \#test_multi_overload\l+ \#test_overload\l+ \#void_meth\ \:\ void\l}" rank=sink];
2
2
  A_Y [label="{class Y||}" rank=sink];
3
3
  subgraph cluster_A_Y {
4
4
  label = "Y"; labelloc=b;
@@ -46,12 +46,12 @@
46
46
 
47
47
  <dl class="constants">
48
48
 
49
- <dt id="CONSTANT-constant ">CONSTANT =
49
+ <dt id="CONSTANT-constant" class="">CONSTANT =
50
50
  <span class="summary_desc"></span>
51
51
  </dt>
52
52
  <dd><pre class="code">'value'</pre></dd>
53
53
 
54
- <dt id="cvar-classvariable ">@@cvar =
54
+ <dt id="cvar-classvariable" class="deprecated">@@cvar =
55
55
  <span class="summary_desc"></span>
56
56
  </dt>
57
57
  <dd><pre class="code">'value'</pre></dd>
@@ -136,6 +136,29 @@
136
136
  </li>
137
137
 
138
138
 
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a title="#attr4= (instance method)">- <strong>attr4</strong> </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+ <span class="note title writeonly">writeonly</span>
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <span class="summary_desc">Sets the attribute attr4.</span>
158
+
159
+ </li>
160
+
161
+
139
162
  </ul>
140
163
 
141
164
 
@@ -452,6 +475,63 @@ end</pre>
452
475
  </table>
453
476
  </div>
454
477
 
478
+
479
+ <span id="attr4=-instance_method"></span>
480
+ <span id=""></span>
481
+ <div class="method_details ">
482
+ <p class="signature " id="attr4=-instance_method">
483
+
484
+ - <strong>attr4=</strong>(value) <span class="extras">(writeonly)</span>
485
+
486
+
487
+
488
+ </p><div class="docstring">
489
+ <div class="discussion">
490
+ Sets the attribute attr4
491
+
492
+ </div>
493
+ </div>
494
+ <div class="tags">
495
+ <h3>Parameters:</h3>
496
+ <ul class="param">
497
+
498
+ <li>
499
+
500
+ <span class='type'></span>
501
+
502
+
503
+ <span class='name'>value</span>
504
+
505
+
506
+
507
+ &mdash;
508
+ the value to set the attribute attr4 to.
509
+
510
+ </li>
511
+
512
+ </ul>
513
+
514
+ </div><table class="source_code">
515
+ <tr>
516
+ <td>
517
+ <pre class="lines">
518
+
519
+
520
+ 20
521
+ 21
522
+ 22</pre>
523
+ </td>
524
+ <td>
525
+ <pre class="code"><span class="info file"># File '(stdin)', line 20</span>
526
+
527
+ def attr4=(value)
528
+ @attr4 = value
529
+ end</pre>
530
+ </td>
531
+ </tr>
532
+ </table>
533
+ </div>
534
+
455
535
  </div>
456
536
 
457
537
 
@@ -472,10 +552,10 @@ end</pre>
472
552
  <pre class="lines">
473
553
 
474
554
 
475
- 20</pre>
555
+ 22</pre>
476
556
  </td>
477
557
  <td>
478
- <pre class="code"><span class="info file"># File '(stdin)', line 20</span>
558
+ <pre class="code"><span class="info file"># File '(stdin)', line 22</span>
479
559
 
480
560
  def self.a; end</pre>
481
561
  </td>
@@ -506,10 +586,10 @@ def self.a; end</pre>
506
586
  <pre class="lines">
507
587
 
508
588
 
509
- 21</pre>
589
+ 23</pre>
510
590
  </td>
511
591
  <td>
512
- <pre class="code"><span class="info file"># File '(stdin)', line 21</span>
592
+ <pre class="code"><span class="info file"># File '(stdin)', line 23</span>
513
593
 
514
594
  def a; end</pre>
515
595
  </td>
@@ -542,10 +622,10 @@ def a; end</pre>
542
622
  <pre class="lines">
543
623
 
544
624
 
545
- 31</pre>
625
+ 33</pre>
546
626
  </td>
547
627
  <td>
548
- <pre class="code"><span class="info file"># File '(stdin)', line 31</span>
628
+ <pre class="code"><span class="info file"># File '(stdin)', line 33</span>
549
629
 
550
630
  def test_multi_overload(*args) end</pre>
551
631
  </td>
@@ -602,10 +682,10 @@ def test_multi_overload(*args) end</pre>
602
682
  <pre class="lines">
603
683
 
604
684
 
605
- 27</pre>
685
+ 29</pre>
606
686
  </td>
607
687
  <td>
608
- <pre class="code"><span class="info file"># File '(stdin)', line 27</span>
688
+ <pre class="code"><span class="info file"># File '(stdin)', line 29</span>
609
689
 
610
690
  def test_overload(*args) end</pre>
611
691
  </td>
@@ -634,10 +714,10 @@ def test_overload(*args) end</pre>
634
714
  <pre class="lines">
635
715
 
636
716
 
637
- 34</pre>
717
+ 36</pre>
638
718
  </td>
639
719
  <td>
640
- <pre class="code"><span class="info file"># File '(stdin)', line 34</span>
720
+ <pre class="code"><span class="info file"># File '(stdin)', line 36</span>
641
721
 
642
722
  def void_meth; end</pre>
643
723
  </td>