From e103da4e613d82220bcabed60f5b86df3ff288d8 Mon Sep 17 00:00:00 2001 From: kazu Date: Tue, 22 Apr 2008 07:47:11 +0000 Subject: * object.c (rb_obj_tap): Correct documentation; pointed out by okkez in [ruby-dev:34472]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ object.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a83f59f78..468e760358 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 22 16:44:00 2008 Kazuhiro NISHIYAMA + + * object.c (rb_obj_tap): Correct documentation; pointed out by + okkez in [ruby-dev:34472]. + Tue Apr 22 10:05:51 2008 NAKAMURA Usaku * file.c (eaccess): workaround for recent msvcrt's behavior. diff --git a/object.c b/object.c index c644b85a45..28b7e4c84e 100644 --- a/object.c +++ b/object.c @@ -502,10 +502,15 @@ rb_obj_is_kind_of(obj, c) * The primary purpose of this method is to "tap into" a method chain, * in order to perform operations on intermediate results within the chain. * - * (1..10) .tap {|x| puts "original: #{x.inspect}"} - * .to_a .tap {|x| puts "array: #{x.inspect}"} - * .select {|x| x%2==0} .tap {|x| puts "evens: #{x.inspect}"} - * .map { |x| x*x } .tap {|x| puts "squares: #{x.inspect}"} + * (1..10).tap { + * |x| puts "original: #{x.inspect}" + * }.to_a.tap { + * |x| puts "array: #{x.inspect}" + * }.select {|x| x%2==0}.tap { + * |x| puts "evens: #{x.inspect}" + * }.map {|x| x*x}.tap { + * |x| puts "squares: #{x.inspect}" + * } * */ -- cgit v1.2.3