Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

kpath not working on custom ksel

#62

Originally posted on Trac by gaspard Original Trac Ticket

 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

Trac Attachments

Trac Comments

Reported by Gaspard Bucher · September 3rd, 2008 @ 03:02 PM

State: new
Milestone: 1.0
Assigned to: Gaspard Bucher Gaspard Bucher

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.