Block.call vs. yield

Let me specify the version numbers I have tested this on, in case it makes a
difference:

ruby 1.7.3 (2002-09-27) [sparc-solaris2.8]
ruby 1.8.0 (2002-12-24) [i686-linux]

I get the same behavior on both.

Thanks,

Matt

···

From: matz@ruby-lang.org (Yukihiro Matsumoto)
Reply-To: ruby-talk@ruby-lang.org
To: ruby-talk@ruby-lang.org (ruby-talk ML)
Subject: Re: block.call vs. yield
Date: Fri, 25 Apr 2003 03:54:18 +0900

Hi,

In message “block.call vs. yield” > on 03/04/25, “Orion Hunter” orion2480@hotmail.com writes:

I noticed that the use of block/yield differs slightly when a “break” is
called in the code.

You’ve found something unnatural. Let me examine.

  					matz.

The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail