[#1147] Copying RVALUE — why the lucky stiff <ruby-core@...>

Hello, everyone. Hope you are all doing well.

18 messages 2003/06/17
[#1155] Re: Copying RVALUE — matz@... (Yukihiro Matsumoto) 2003/06/20

Hi,

[#1157] Re: Copying RVALUE — why the lucky stiff <ruby-core@...> 2003/06/20

Yukihiro Matsumoto (matz@ruby-lang.org) wrote:

[#1173] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...>

Hi, I'm new to this mailing list so I don't know the procedure for

15 messages 2003/06/22
[#1174] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — nobu.nokada@... 2003/06/22

Hi,

[#1175] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...> 2003/06/22

On Sun, 2003-06-22 at 05:36, nobu.nokada@softhome.net wrote:

[#1176] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — nobu.nokada@... 2003/06/22

Hi,

[#1193] Re: [Patch] class.c code cleanup (rb_class_*_instance_methods) — Matthew Dempsky <jivera@...> 2003/06/25

On Sun, 2003-06-22 at 07:41, nobu.nokada@softhome.net wrote:

[#1177] Re: In 1.8.0 nil.to_s is not the same as "" — ts <decoux@...>

14 messages 2003/06/22

[1.8] alias

From: ts <decoux@...>
Date: 2003-06-01 10:09:43 UTC
List: ruby-core #1110
 I still don't understand alias, normal this ?


svg% cat b.rb
#!./ruby -v

module M
   def init(a)
      p "M #{a}"
   end

end

class A
   include M

   def init(a)
      p "A : #{a}"
      super 12
   end
end

module N
   def init(a)
      p "N #{a}"
      super 12
   end
   alias_method :abc, :init
end

class B < A
   include N
   def init(a)
      p "B#init"
      super
   end

   def abc(b)
      p "abc"
      super
   end
end

puts "======================="
b = B.new
b.init(24)
puts "======================="
b.abc(36)
svg% 

svg% b.rb
ruby 1.8.0 (2003-06-01) [i686-linux]
=======================
"B#init"
"N 24"
"A : 12"
"M 12"
=======================
"abc"
"N 36"
./b.rb:22:in `abc': method `init' called on terminated object (0x40099038) (NotImplementedError)
        from ./b.rb:36:in `abc'
        from ./b.rb:44
svg% 


Guy Decoux

In This Thread

Prev Next