RDoc: Really wrong output (Module#method instead of Module::Class#method)

Hi, I'm getting really crazy with RDoc (tested in 1.8 and 1.9).

Basically I've a module containing a class containing a method. And
when I generate the rdoc, the HTML output show the method as a module
method instead of class. ¿?¿?

However, if I test with a simple file:

···

-----------------
module MyModule
        class MyClass
                def initialize
                        puts "hello"
                end
        end
end
-----------------

then the output is correct.

I've checked and re-checked my code and is correct. In fact, I use it :slight_smile:
Is there any known issue about it? Thanks.

--
Iñaki Baz Castillo
<ibc@aliax.net>

I've found the bug!

There is:

···

2009/7/28 Iñaki Baz Castillo <ibc@aliax.net>:

Hi, I'm getting really crazy with RDoc (tested in 1.8 and 1.9).

Basically I've a module containing a class containing a method. And
when I generate the rdoc, the HTML output show the method as a module
method instead of class. ¿?¿?

However, if I test with a simple file:

-----------------
module MyModule
class MyClass
def initialize
puts "hello"
end
end
end
-----------------

then the output is correct.

-----------------
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
-----------------

Adding that "case" stament confuses RDoc and generates wrong output.
You can check it by creating the above file and generating rdoc. The
class method "initialize" will appear as a MyModule method.

Could somebody confirm it so I would report the bug? Thanks a lot.

--
Iñaki Baz Castillo
<ibc@aliax.net>

Can you file it in the tracker?

···

On Jul 28, 2009, at 10:36, Iñaki Baz Castillo wrote:

2009/7/28 Iñaki Baz Castillo <ibc@aliax.net>:

Hi, I'm getting really crazy with RDoc (tested in 1.8 and 1.9).

Basically I've a module containing a class containing a method. And
when I generate the rdoc, the HTML output show the method as a module
method instead of class. ¿?¿?

However, if I test with a simple file:

-----------------
module MyModule
       class MyClass
               def initialize
                       puts "hello"
               end
       end
end
-----------------

then the output is correct.

I've found the bug!

There is:

-----------------
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
-----------------

Adding that "case" stament confuses RDoc and generates wrong output.
You can check it by creating the above file and generating rdoc. The
class method "initialize" will appear as a MyModule method.

Could somebody confirm it so I would report the bug? Thanks a lot.

http://rubyforge.org/tracker/index.php?func=detail&aid=26777&group_id=627&atid=2472

:slight_smile:

···

El Martes, 28 de Julio de 2009, Eric Hodel escribió:

> I've found the bug!
>
> There is:
>
>
> -----------------
> 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
> -----------------
>
>
> Adding that "case" stament confuses RDoc and generates wrong output.
> You can check it by creating the above file and generating rdoc. The
> class method "initialize" will appear as a MyModule method.
>
> Could somebody confirm it so I would report the bug? Thanks a lot.

Can you file it in the tracker?

--
Iñaki Baz Castillo <ibc@aliax.net>