Project

General

Profile

Actions

Bug #7944

closed

1.9.3 can't process and generate documentation for 2.0.0 (lib/profiler.rb)

Added by luislavena (Luis Lavena) about 11 years ago. Updated about 11 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3p385 (2013-02-06) [i386-mingw32]
Backport:
[ruby-core:52832]

Description

=begin

While working on RubyInstaller, we try to generate RDoc of Ruby source.

Using RDoc 3.12.1, we received the following:

Parsing sources...
18% [125/663] lib/profiler.rb
RDoc::Parser::Ruby failure around line 79 of
lib/profiler.rb

Before reporting this, could you check that the file you're documenting
has proper syntax:

C:/Users/Luis/Tools/Ruby/ruby-1.9.3-p385-i386-mingw32/bin/ruby.exe -c lib/profiler.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

     (RDoc::RubyLex::Error) unknown type of %string "i"

rake aborted!
unknown type of %string "i"

When executed ruby with (({-c})) received the following:

C:\Users\Luis\Code\oneclick\rubyinstaller>ruby -v -c sandbox\ruby_1_9\lib\profiler.rb
ruby 1.9.3p385 (2013-02-06) [i386-mingw32]
sandbox/ruby_1_9/lib/profiler.rb:79: unknown type of %string
...CALL_PROC = TracePoint.new(%i[call c_call b_call]) {|tp| # ...
... ^
sandbox/ruby_1_9/lib/profiler.rb:79: syntax error, unexpected $end
...CALL_PROC = TracePoint.new(
%i[call c_call b_call]) {|tp| # ...
... ^

The syntax is OK for 2.0.0:

C:\Users\Luis\Code\oneclick\rubyinstaller>sandbox\ruby19_mingw\bin\ruby -v -c sandbox\ruby_1_9\lib\profiler.rb
ruby 2.0.0p0 (2013-02-24) [i386-mingw32]
Syntax OK

We can't use Ruby's 2.0 RDoc version as we need rdoc_chm gem and we are building a clean installer.

I would like to know if is possible change (({lib/profiler.rb})) to use an array of symbols instead.

Thank you
=end

Updated by drbrain (Eric Hodel) about 11 years ago

Could you use an RDoc 3.x with %i support, or must you use an RDoc that comes with ruby?

I can release RDoc 3.13 with %i support if that would be sufficient.

Updated by luislavena (Luis Lavena) about 11 years ago

  • Assignee changed from nobu (Nobuyoshi Nakada) to drbrain (Eric Hodel)

drbrain (Eric Hodel) wrote:

Could you use an RDoc 3.x with %i support, or must you use an RDoc that comes with ruby?

I can use any version of RDoc to build the documentation, as long it can be installed in Ruby 1.9.3

I can release RDoc 3.13 with %i support if that would be sufficient.

That will be awesome, that way 1.9.3 can parse doc for Ruby 2.0

Thank you.

Updated by drbrain (Eric Hodel) about 11 years ago

Can you verify rdoc 3.12 branch (or 3 branch, they are the same) works with rdoc_chm and %i before I release?

My simple check seems to work fine.

Updated by luislavena (Luis Lavena) about 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Hello Eric,

Yes, branch 3.12 works perfectly!

Would you release 3.12.2 or 3.13?

Version 4.0 is too incompatible for our CHM generator.

Thank you.

Updated by drbrain (Eric Hodel) about 11 years ago

OK, 3.12.2 is released.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0