Permalink
Browse files

fix reloader issue with some gems that redefine Class#name (like pry)

Signed-off-by: David A. Cuadrado <krawek@gmail.com>
  • Loading branch information...
dcu committed Mar 16, 2012
1 parent e650330 commit 9e7b99b4b03407523227d5bd21eb29ee70535078
Showing with 1 addition and 1 deletion.
  1. +1 −1 padrino-core/lib/padrino-core/reloader.rb
@@ -103,7 +103,7 @@ def changed?
# We lock dependencies sets to prevent reloading of protected constants
#
def lock!
- klasses = ObjectSpace.classes.map { |klass| klass.name.split('::')[0] }.uniq
+ klasses = ObjectSpace.classes.map { |klass| klass.to_s.split('::')[0] }.uniq
klasses = klasses | Padrino.mounted_apps.map { |app| app.app_class }
Padrino::Reloader.exclude_constants.concat(klasses)
end

1 comment on commit 9e7b99b

@DAddYE

This comment has been minimized.

Show comment Hide comment
@DAddYE

DAddYE Mar 18, 2012

Yep, we reverted back to name because some libs redefine also to_s ... so suggestions?

DAddYE commented on 9e7b99b Mar 18, 2012

Yep, we reverted back to name because some libs redefine also to_s ... so suggestions?

Please sign in to comment.