[#600] A `File' is not a `IO'????? — clemens.hintze@...

17 messages 1999/08/10
[#602] Re: A `File' is not a `IO'????? — matz@... (Yukihiro Matsumoto) 1999/08/10

Hi,

[#679] Documentation about RD? — Clemens Hintze <c.hintze@...>

Hi,

78 messages 1999/08/17
[#680] Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

=begin

[#683] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, Toshiro Kuwabara wrote:

[#686] Re: Summary of discussion about RD (Re: Documenta tion about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#687] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — clemens.hintze@... 1999/08/18

On 18 Aug, GOTO Kentaro wrote:

[#693] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#695] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/18

On 19 Aug, Toshiro Kuwabara wrote:

[#697] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#703] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Toshiro Kuwabara wrote:

[#706] Re: Summary of discussion about RD (Re: Docum enta tion about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#681] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#682] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#684] Re: Summary of discussion about RD (Re: Documentation about RD?) — TAKAHASHI Masayoshi <maki@...> 1999/08/18

Hi Tosh and all,

[#685] Re: Summary of discussion about RD (Re: Documentation about RD?) — gotoken@... (GOTO Kentaro) 1999/08/18

Hi,

[#689] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/18

Hi,

[#694] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/18

Hi,

[#700] Re: Summary of discussion about RD (Re: Documentation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/19

Hi,

[#702] Re: Summary of discussion about RD (Re: Documentation about RD?) — matz@... (Yukihiro Matsumoto) 1999/08/19

Hi,

[#704] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Clemens Hintze <c.hintze@...> 1999/08/19

On 19 Aug, Yukihiro Matsumoto wrote:

[#719] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#720] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 20 Aug, Toshiro Kuwabara wrote:

[#721] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#722] Re: Summary of discussion about RD (Re: Docum entation about RD?) — clemens.hintze@... 1999/08/20

On 21 Aug, Toshiro Kuwabara wrote:

[#723] Re: Summary of discussion about RD (Re: Docum entation about RD?) — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/20

Hi,

[#737] RD with multi charset — Minero Aoki <aamine@...>

Hi, I'm Minero Aoki. This is my first mail in this mailling list.

26 messages 1999/08/22

[ruby-talk:00550] Re: Question concerning modules (1)

From: Kazuhiro HIWADA <hiwada@...>
Date: 1999-08-03 13:40:05 UTC
List: ruby-talk #550
Hi,

From: clemens.hintze@alcatel.de
Subject: [ruby-talk:00546] Question concerning modules (1)
Date: Tue, 3 Aug 1999 12:49:27 +0200 (MET DST)

> rbc0> foo = Foo.clone
> Foo
> 
> # Now I have cloned `Foo' and store it into a variable
> 
> rbc0> foo.show
> NameError: (eval):1: undefined method `show' for Foo:Module
> 
> # Hmm, the instance in `foo' doesn't know `show' yet. Is okay, I guess.
> # Same reason as before.

`show' is foo's instance_method, not method.

> rbc0> Foo.instance_variables.include? "@ivar"
> true
> 
> # Aha! `Foo' contains the instance variable.

Yes. But it's not instance variable of Foo's instance.

> rbc0> foo.instance_variables.include? "@ivar"
> true
> 
> # And so does `foo'!
> 
> rbc0> Foo.methods.include? :show
> false
> 
> # Oops! `Foo' knows about instance variables, but not methods????

Object#methods returns string array. You have to write `include? "show"'.

> rbc0> foo.methods.include? :show
> false
> 
> # Same here...
> 
> rbc0> foo.extend(Foo)
> Foo
> 
> # Now the instance referred by `foo' will be extend by module `Foo'. I
> # would not assume something special here! As `foo' is already a `Foo',
> # it should not change anything, should it?

No. Just foo's class (singleton class?) achive the Foo's feature.

> rbc0> foo.methods.include? :show
> false
> 
> # Right! It has changed nothing. Or ... ?

foo.methods.include? "show" #--> true

> rbc0> foo.show
> Value is: `12'
> nil
> 
> # Hah! Gotcha! What is that? Please help and explain!

Cause foo's (singleton) class is extended by Foo, foo has the method `show'.

Hope this helps,
--
sorry for my broken english
best regards
Kazuhiro HIWADA (hiwada@kuee.kyoto-u.ac.jp)

In This Thread