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

Changeset 2976

Show
Ignore:
Timestamp:
11/10/05 20:32:13 (3 years ago)
Author:
ulysses
Message:

Fix const_missing handler to ignore the trailing '.rb' on files when comparing paths.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/CHANGELOG

    r2930 r2976  
    11*1.2.3* (November 7th, 2005) 
     2 
     3* Fix const_missing handler to ignore the trailing '.rb' on files when comparing paths. [Nicholas Seckar] 
    24 
    35* Define kernel.rb methods in "class Object" instead of "module Kernel" to work around a Windows peculiarity [Sam Stephenson] 
  • trunk/activesupport/lib/active_support/dependencies.rb

    r2901 r2976  
    197197    rescue MissingSourceFile => e 
    198198      # Convert the exception to a NameError only if the file we are looking for is the missing one. 
    199       raise unless e.path == "#{file_name}.rb" 
     199      raise unless e.is_missing? file_name 
    200200      raise NameError.new("uninitialized constant #{class_id}").copy_blame!(e) 
    201201    end