what would you expect?
class Base
C = 1
end
class Derived < Base
end
Base.const_defined?(:C) # => true
Derived.const_defined?(:C) # => ?
The answer is, true in 1.9, false in 1.8.
What would you expect? I vote for 1.9.
What have you found for these years?
class Base
C = 1
end
class Derived < Base
end
Base.const_defined?(:C) # => true
Derived.const_defined?(:C) # => ?
The answer is, true in 1.9, false in 1.8.
What would you expect? I vote for 1.9.
Author: Lin Jen-Shin (godfat) at 8/18/2010 02:58:00 AM
0 retries:
Post a Comment
Note: Only a member of this blog may post a comment.