ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* Rdoc (1.8 and 1.9): Wrong processing if using do blocks in an expression
@ 2008-01-16 20:58 Wolfgang Nádasi-Donner
  0 siblings, 0 replies; only message in thread
From: Wolfgang Nádasi-Donner @ 2008-01-16 20:58 UTC (permalink / raw
  To: Ruby-Core

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

Good evening!

This is an error report with lower precedence (I think). I attached a zip
file of the complete file structure (Windows format "\r\n").

When processing (extract)...

while continue_sub && (str.sub!(@actual_group.pattern) do
     instance_exec($~,
       &(@actual_group.replacements[
           (@actual_group.pattern_groups & $~.names).find{|g|not ($~[g].nil?)}
         ]
       )
     )
   end
   )
end

...Rdoc (versions for Ruby 1.8 and Ruby 1.9) have problems. This code is inside 
a method definition of a class. The generated HTML registers the next method of 
the class as being defined on top level. With the following variant using braces 
instead of do...end, Rdoc doesn't have any problem...

while continue_sub && (str.sub!(@actual_group.pattern){
     instance_exec($~,
       &(@actual_group.replacements[
           (@actual_group.pattern_groups & $~.names).find{|g|not ($~[g].nil?)}
         ]
       )
     )
   }
   )
end

btw - both variants are syntactically correct, and both variants work fine in 
theyr real environment, which is much larger.

Wolfgang Nádasi-Donner

[-- Attachment #2: core-RdocProblem.zip --]
[-- Type: application/zip, Size: 37592 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-16 21:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 20:58 Rdoc (1.8 and 1.9): Wrong processing if using do blocks in an expression Wolfgang Nádasi-Donner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).