From: Nobuyoshi Nakada Date: 2007-09-04T17:24:47+09:00 Subject: Re: with Hi, At Tue, 4 Sep 2007 16:47:07 +0900, Michael Fellinger wrote in [ruby-talk:267472]: > They have different effects, while 'tap' will return self and throw > away results of the block, 'with' returns the result of the block. Sorry. > 1.tap{|e| e + 1} + 2 > # 3 > 1.with{|e| e + 1} + 2 > # 4 1.tap{|e| break e + 1} + 2 # 4 -- Nobu Nakada