Bugs: Browse | Submit New | Admin

[#26777] Wrong parsing of "case" stament produces unexpected location of classes and methods

Date:
2009-07-28 20:36
Priority:
3
Submitted By:
IƱaki Baz Castillo (ibc)
Assigned To:
Eric Hodel (drbrain)
Category:
None
State:
Open
Summary:
Wrong parsing of "case" stament produces unexpected location of classes and methods

Detailed description
RDoc fails to parse the following "case" stament:

-----------------
module MyModule

       class MyClass

               RUBY_VERSION_CORE = case RUBY_VERSION
                     when /^1\.9\./
                        :RUBY_1_9
                     when /^1\.8\./
                        :RUBY_1_8
                     end

               def initialize
                       puts "hello"
               end

       end
end
-----------------

Due to it, the generated rdoc contains wrong association between modules, classes and methods.

For example, in the example above, after generating rdoc, the method "initialize" will appear as a method
of "MyModule" module, instead of "MyModule::MyClass".

Tested in Ruby 1.8 and 1.9.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2009-09-02 09:52zenspider
summaryWrong parsing of "case" stament produces unexpected location of classes and methods2009-09-02 09:52zenspider