more fix in detecting file dependencies

if add the constant name into @defined and @referred in #on_const_path_ref,
it might not detect dependencies.
This commit is contained in:
Watson
2013-04-29 22:02:29 +09:00
parent 8591584570
commit 0410711198

View File

@@ -635,9 +635,25 @@ PLIST
def on_const_path_ref(parent, args)
type, name, position = args
if type == :@const
@defined << name
@referred << name
end
args
end
def on_module(const, *args)
type, name = const
if type == :@const
@defined << name
@referred.delete(name)
end
end
def on_class(const, *args)
type, name = const
if type == :@const
@defined << name
@referred.delete(name)
end
end
end
end