Permalink
Browse files

Merge branch 'master' of git://github.com/padrino/padrino-framework

  • Loading branch information...
2 parents d70cb45 + 865d67c commit f2055485950739a2d1776ce54def851b03e2503b @ujifgc committed Apr 11, 2012
@@ -103,7 +103,7 @@ def changed?
# We lock dependencies sets to prevent reloading of protected constants
#
def lock!
- klasses = ObjectSpace.classes.map { |klass| "#{klass}".split('::')[0] }.uniq
+ klasses = ObjectSpace.classes.map { |klass| klass._orig_klass_name.split('::')[0] }.uniq
klasses = klasses | Padrino.mounted_apps.map { |app| app.app_class }
Padrino::Reloader.exclude_constants.concat(klasses)
end
@@ -189,6 +189,14 @@ def undent
end
##
+# Make sure we can always use the class name
+# In reloader for accessing class_name Foo._orig_klass_name
+#
+class Module
+ alias :_orig_klass_name :to_s
+end
+
+##
# Loads our locale configuration files
#
I18n.load_path += Dir["#{File.dirname(__FILE__)}/locale/*.yml"] if defined?(I18n)
@@ -37,7 +37,7 @@ class << self
#
# @example Register the helper module
# require 'padrino-helpers'
- # class Padrino::Appliocation
+ # class Padrino::Application
# register Padrino::Helpers
# end
#

0 comments on commit f205548

Please sign in to comment.