forked from tenderlove/recma
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn://rubyforge.org/var/svn/rkelly/trunk@169 bf63cea8-67a3-4864-ab90-c58634fce689
- Loading branch information
aaronp
committed
Jan 25, 2008
1 parent
3324541
commit 3e32f06
Showing
3 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
module RKelly | ||
module Nodes | ||
class ResolveNode < Node | ||
def =~(other) | ||
def ==(other) | ||
return true if super | ||
if @value =~ /^[A-Z]/ | ||
klass = [Object, Module].find { |x| x.const_defined?(@value.to_sym) } | ||
return true if klass && other.value.is_a?(klass) | ||
end | ||
false | ||
end | ||
alias :=~ :== | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters