Project

General

Profile

Actions

Bug #6449

closed

new does not call allocate, as advertized

Added by schnittchen (Thomas Stratmann) over 12 years ago. Updated over 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p217 (2012-05-18 revision 35702) [x86_64-darwin10.8.0]
Backport:
[ruby-core:45125]

Description

ruby 1.9.3p217 (2012-05-18 revision 35702) [x86_64-darwin10.8.0] (1.8 seems the same)

class C
def self.allocate
Kernel.exit(1)
end
end

C.new # => <C:...

C.allocate # terminates process

Expected C.new call to invoke allocate, see here: https://github.com/ruby/ruby/blob/trunk/object.c#L1697

Actions

Also available in: Atom PDF

Like0
Like0Like0