ruby-changes:4648
From: ko1@a...
Date: Tue, 22 Apr 2008 16:47:29 +0900 (JST)
Subject: [ruby-changes:4648] kazu - Ruby:r16142 (ruby_1_8): * object.c (rb_obj_tap): Correct documentation; pointed out by
kazu 2008-04-22 16:47:11 +0900 (Tue, 22 Apr 2008) New Revision: 16142 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/object.c Log: * object.c (rb_obj_tap): Correct documentation; pointed out by okkez in [ruby-dev:34472]. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=16142&r2=16141&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/object.c?r1=16142&r2=16141&diff_format=u Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 16141) +++ ruby_1_8/ChangeLog (revision 16142) @@ -1,3 +1,8 @@ +Tue Apr 22 16:44:00 2008 Kazuhiro NISHIYAMA <zn@m...> + + * object.c (rb_obj_tap): Correct documentation; pointed out by + okkez in [ruby-dev:34472]. + Tue Apr 22 10:05:51 2008 NAKAMURA Usaku <usa@r...> * file.c (eaccess): workaround for recent msvcrt's behavior. Index: ruby_1_8/object.c =================================================================== --- ruby_1_8/object.c (revision 16141) +++ ruby_1_8/object.c (revision 16142) @@ -502,10 +502,15 @@ * 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}" + * } * */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/