Actions
Bug #632
closedStringIO has an odd alias implementation [?]
Description
=begin
Here's my situation:
require 'stringio'
class C < StringIO
alias :old_init :initialize
def initialize
old_init
end
end
C.new # fails 1.9, succeeds 1.8.6
normal classes:
class A
def initialize
print 'A init'
end
end
class B < A
alias :old_init :initialize
def initialize
old_init
end
end
B.new # succeeds 1.9, 1.8
Thanks for your help! I know I'm annoying with this.
=end
Updated by ko1 (Koichi Sasada) about 16 years ago
- Assignee set to matz (Yukihiro Matsumoto)
=begin
=end
Updated by nobu (Nobuyoshi Nakada) about 16 years ago
- Category set to core
- Assignee changed from matz (Yukihiro Matsumoto) to ko1 (Koichi Sasada)
- Target version set to 1.9.1 Release Candidate
=begin
=end
Updated by yugui (Yuki Sonoda) about 16 years ago
- Due date set to 12/24/2008
- Category changed from core to YARV
=begin
=end
Updated by wanabe (_ wanabe) almost 16 years ago
=begin
I guess the behavior is by this flow:
- C#initialize
-> C#old_init ( == StringIO#initialize )
-> strio_initialize()
-> rb_call_super()
-> Object#old_init
-> NoMethodError
1.8 avoids the problem because ruby_frame->orig_func can differ from ruby_frame->last_func,
so Object#old_init is not called but Object#initialize is.
=end
Updated by ko1 (Koichi Sasada) almost 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r21084.
=end
Actions
Like0
Like0Like0Like0Like0Like0