Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #380 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] eliminate const_missing loop

Reported by: bitsweat Assigned to: rails@bitsweat.net
Priority: normal Milestone: 0.9.5
Component: ActiveRecord Version: 0.9.2
Severity: normal Keywords: const_missing
Cc:

Description

The const_missing autoload assumes the requested constant is set by require_association and calls const_get to retrieve it. If require_association does not set the constant then const_get will call const_missing, resulting in an infinite loop. This fix checks whether const_defined? before const_get.

Attachments

associations_const_missing.diff (0.7 kB) - added by bitsweat on 12/27/04 20:29:02.

Change History

12/27/04 20:29:02 changed by bitsweat

  • attachment associations_const_missing.diff added.

12/28/04 14:17:59 changed by david

  • status changed from new to closed.
  • resolution set to fixed.