From: David Alan Black Date: 2002-02-18T10:32:57+09:00 Subject: Re: LocalJumpError when defining each Hello -- On Mon, 18 Feb 2002, Matt Kussow wrote: > I noticed that the block does propogate automatically when super is > called. > Does anyone know if this behavior will also be "fixed"? The > following script works in both 1.6.5 and 1.6.6. > > ------------------------------------ > #!/usr/bin/env ruby > class Base > def each > yield 1 > end > end > > class Derived < Base > def each > super > end > end > > Derived.new.each { |x| print x, "\n" } > --------------------------------------- I don't think that will change -- super passes along all the original arguments too (unless told otherwise with (arglist)). It's a special case: repeat the call to this method, but skip the current method in the method search-chain. It's rather as if the current method has steamed the envelope open, peeked inside, and then resealed it. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav