Ticket #62 (new defect)

Opened 1 year ago

kpath not working on custom ksel

Reported by: gaspard Assigned to: gaspard
Priority: major Milestone: 1.0
Component: zena Keywords: tracker
Cc: Estimated Number of Hours:
Add Hours to Ticket: Billable?:
Total Hours:

Description

This bug quite hard to track is due to Node calling child.kpath in inherited.

The problem is that kpath is cached and the method 'kpath' is called before the child is defined, so kpath can be wrong.

Here is an exemple of what is going on:

class A
  def self.hello
    puts "#{self} says hello 'A'"
  end
  
  def self.inherited(child)
    puts "A is being inherited by #{child}"
    child.hello
    super
  end
  puts "A defined"
end

class B < A
  def self.hello
    puts "#{self} says hello 'B'"
  end
  puts "B defined"
end


B.hello