Project

General

Profile

Bug #2793

inherited hook now runs before Class.new block

Added by bitsweat (Jeremy Daer) about 9 years ago. Updated about 8 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.8.8dev (2010-02-24 revision 26634) [i386-darwin10.2.0]
[ruby-core:28344]

Description

=begin

class A; def self.inherited(foo) foo.bar end end
=> nil
Class.new(A) { def self.bar; 'bar' end }

# 1.8.7
=> #Class:0x1003452f0

# 1.8.8 (regression or backport?)
NoMethodError: undefined method `bar' for #Class:0x1003470a0

# 1.9.2
NoMethodError: undefined method `bar' for #Class:0x0000010107daa8
=end

History

#1

Updated by wycats (Yehuda Katz) about 9 years ago

=begin
In my opinion, 1.8.8 should reliably run 1.8.7 applications, so this should be reverted :)
=end

Also available in: Atom PDF