# RDoc & Proc constants

**URL:** <https://www.ruby-forum.com/t/rdoc-proc-constants/93072>\
**Category:** Ruby\
**Created:** [April 27, 2007, 4:18am UTC](https://www.ruby-forum.com/t/rdoc-proc-constants/93072 "2007-04-27T04:18:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindtriggerz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4491bb/32.png) [@mindtriggerz](https://www.ruby-forum.com/u/mindtriggerz)\
**Post date:** [April 27, 2007, 4:18am UTC](https://www.ruby-forum.com/t/rdoc-proc-constants/93072/1 "2007-04-27T04:18:59Z")

</div>

I’ve been having a problem getting RDoc to recognize some Proc  
constants, and  
boiled it down to this:

module Foo  
Bar = lambda do puts end

Saw = lambda do  
puts  
end

Tox = lambda do  
puts  
puts  
end

Grom = lambda do  
(0…2).each do |x|  
puts x  
end  
end  
end

When I run RDoc on this, load up the HTML, and click on Foo under  
Classes, only  
Bar and Saw show up. When I click on test.rb under Files, only Tox shows  
up.  
Shouldn’t all 4 constants appear in both places? I’ve played around with  
different options, and XML output, and the same thing happens.

$ rdoc -D 2\>/dev/null | grep CONSTANT  
#\<RubyToken::TkCONSTANT:0xb7c47658 @text=“Foo”, @name=“Foo”, @char\_no=7,  
@line\_no=1\>  
#\<RubyToken::TkCONSTANT:0xb7c43f1c @text=“Bar”, @name=“Bar”, @char\_no=2,  
@line\_no=2\>  
#\<RubyToken::TkCONSTANT:0xb7c3b6a0 @text=“Saw”, @name=“Saw”, @char\_no=2,  
@line\_no=4\>  
#\<RubyToken::TkCONSTANT:0xb79f17dc @text=“Tox”, @name=“Tox”, @char\_no=2,  
@line\_no=8\>

So all 4 are being recognized as constants. Google tells me there have  
been  
issues with multi-line constants before, but I don’t know what the  
current  
state of affairs is. Bug, or no?

$ rdoc --version  
RDoc V1.0.1 - 20041108  
$ ruby --version  
ruby 1.8.5 (2006-12-04 patchlevel 2) [i686-linux]
