This project is archived and is in readonly mode.

#4774 ✓stale
Wilson Bilkovich

[PATCH] Exception.subclasses fails with syntax error

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

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages