Hi.

This weekend I spent a bit of time trying to discover what causes rcov
to recieve line numbers greater than present in source files. I
suspected some ruby bug. But it turned out to be a small rails buglet.

Dynamic definition of recognize_optimized uses __FILE__ and __LINE__ as
it's context which for sufficiently large routes produces large enough
line numbers. I think that using __FILE__ is not correct, because it
confuses original lines of __FILE__ with generated ones. The fix is here
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1319-patch-dont-eval-recognize_optimized-as-part-of-recognition_optimizationrb-it-produces-meaningless-line-numbers


-- 
Aliaksey Kandratsenka <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to