Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[patch] better cleaning of gem directories

#3129

Rails::BacktraceCleaner doesn't clean gem paths for gems that have more than one word, or non-alpha characters in their names, such as:
thoughtbot-factory_girl
ZenTest
db2s3

The attached patch fixes this bug (against cc1efe7e5af32789a9ed0f80528e629861dbe6a7 / master on Sep 1 2009)

Reported by Xavier Shay · September 1st, 2009 @ 02:20 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Matt Jones
    Matt Jones

    A quick comment on the patch: don't use real gem names in the tests. It's been known to cause obscure and hard-to-reproduce bugs; that's why you see weird names like 'xhpricotx' in there.

    September 5th, 2009 @ 05:45 AM

  2. Xavier Shay
    Xavier Shay

    Updated patch to include Matt Jones' suggestion

    September 10th, 2009 @ 10:41 AM

  3. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from backtrace_cleaner, bug, patch, railties to backtrace_cleaner, bug, bugmash, patch, railties

    September 25th, 2009 @ 12:36 PM

  4. Blue Box Jesse
    Blue Box Jesse

    BugMash +1

    Code makes sense.

    Patch applies successfully and tests pass.

    September 27th, 2009 @ 02:32 AM

  5. Matt Jones
    Matt Jones

    Patch looks great - but there's one more wrinkle that just came to mind: prerelease gems.

    http://rubyforge.org/frs/shownotes.php?release_id=33411

    So it's possible to have a gem directory named 'foobar-baz_mojo-1.2.3.wut', for instance.

    September 27th, 2009 @ 03:14 AM

  6. Elad Meidar
    Elad Meidar

    +1 verified on 2-3-stable and patch applies cleanly, tests pass a well.

    September 27th, 2009 @ 07:42 AM

  7. MOROHASHI Kyosuke
    MOROHASHI Kyosuke

    +! verified on 2-3-stable w/ ruby187 and ruby192(trunk), works fine.

    September 27th, 2009 @ 09:20 AM

  8. sr.iniv.t
    sr.iniv.t

    +1 verified.

    The patch applies on 2-3-stable and all tests pass.

    September 27th, 2009 @ 07:24 PM

  9. Gaius Centus Novus
    Gaius Centus Novus

    +1, verified on 2.3 stable / Ruby 1.8.6

    September 27th, 2009 @ 09:56 PM

  10. Greg Hazel
  11. Rizwan Reza
    Rizwan Reza
    • Tag changed from backtrace_cleaner, bug, bugmash, patch, railties to backtrace_cleaner, bug, patch, railties

    February 12th, 2010 @ 12:46 PM

  12. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open
    • Importance changed from to

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:55 PM

  13. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:55 PM

  14. Xavier Shay
    Xavier Shay
    • State changed from stale to resolved

    Sadface this never got applied. In master now, the tests are still rubbish, but it appears the actual regex has been fixed. If there are still issues, they deserve a new ticket and a new patch (this won't apply to current master).

    [state:resolved]

    February 2nd, 2011 @ 08:02 PM