#62 new
Gaspard Bucher

kpath not working on custom ksel

Reported by Gaspard Bucher | September 3rd, 2008 @ 03:02 PM | in 1.0

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

No comments found

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Anyone knows how to use formatting here ?

Git repository: http://github.com/zena

Official website: http://zenadmin.org

Shared Ticket Bins

People watching this ticket

Tags

Pages