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] Exception.subclasses fails with syntax error

#4774

Here is an example of the failure: https://gist.github.com/b334efbd305d202ee05b

The problem is that 'fatal' is one of the subclasses of Exception. It has a name ('fatal'), and therefore the current implementation of 'subclasses' on 2-3-stable tries to run 'defined?(::fatal)', which is not valid syntax on any version of Ruby.

Patch is against 2-3-stable, since 3.0 uses a different (better) technique.

I chose to special-case 'fatal' since it isn't like there are a lot of lower-cased classes floating around out there.

Reported by Wilson Bilkovich · June 5th, 2010 @ 09:28 PM

State: stale
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Wayne Seguin
    Wayne Seguin

    This is definitely a needed patch IMHO. +1!

    June 5th, 2010 @ 09:31 PM

  2. David Trasbo
    David Trasbo
    • Assigned user set to José Valim

    +1 from here too. Assigning it to José. Maybe he'll apply it.

    July 28th, 2010 @ 06:42 PM

  3. Andrea Campi
    Andrea Campi
    • Tag changed from active_support core_ext, 2.3-stable, patched to active_support core_ext, 2.3-stable, patch

    bulk tags cleanup

    October 11th, 2010 @ 07:24 AM

  4. José Valim
    José Valim
    • State changed from new to stale
    • Importance changed from to Low

    October 11th, 2010 @ 11:28 PM