[#863] RDtool-0.5.0 — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
Hi,
18 messages
1999/10/23
[#864] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/10/26
Hi,
[#865] Re: RDtool-0.5.0
— Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
1999/10/26
Hi,
[#866] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/10/26
Hi,
[#892] Re: RDtool-0.5.0
— Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
1999/10/31
Hi,
[#894] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/11/01
Hi,
[#905] Re: RDtool-0.5.0
— Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
1999/11/04
Hi,
[#906] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/11/04
Hi,
[#907] Re: RDtool-0.5.0
— Kazuhiro HIWADA <hiwada@...>
1999/11/04
Hi,
[#908] Re: RDtool-0.5.0
— kjana@... (YANAGAWA Kazuhisa)
1999/11/05
In message <19991105025532K.hiwada@kuee.kyoto-u.ac.jp>
[#867] call with a Proc — ts <decoux@...>
11 messages
1999/10/28
[#868] Re: call with a Proc
— gotoken@... (GOTO Kentaro)
1999/10/28
Hi,
[#877] local / dynamic variables — ts <decoux@...>
11 messages
1999/10/29
[#878] Re: local / dynamic variables
— gotoken@... (GOTO Kentaro)
1999/10/29
Hi,
[ruby-talk:00874] Re: call with a Proc
From:
matz@... (Yukihiro Matsumoto)
Date:
1999-10-28 07:46:24 UTC
List:
ruby-talk #874
Hi,
In message "[ruby-talk:00871] call with a Proc"
on 99/10/28, Clemens Hintze <c.hintze@gmx.net> writes:
|As the methods 'proc', 'lambda' and 'Proc.new' will takes a block, and
|converts it into a 'Proc' instance, they *consume* that block! There
|is no block afterwards!!!
Hmm, that's inaccurate. Every methods consume the block given to
them. In this case:
| b.list(..., Proc.new{ <do something> });
the block { <do something> } is passed to Proc.new only, no other
method invocation receives that block. An method which is block
unaware is silently ignore block.
In fact, the Proc making methods (proc, lambda, Proc.new) do not
consume the block. For exapmle,
def foo
p lambda
p lambda
end
foo{p 5}
gives
#<Proc:0x401f0d50>
#<Proc:0x401f0d14>
that means two distinct Proc object from same block are generated.
matz.