[#38392] Enumerable#gather_each — Tanaka Akira <akr@...>

ときに、複数行をまとめて扱いたいことがあります。

47 messages 2009/05/09
[#38394] Re: Enumerable#gather_each — ujihisa <ujihisa@...> 2009/05/09

ujihisaと申します。

[#38400] Re: Enumerable#gather_each — Yukihiro Matsumoto <matz@...> 2009/05/09

まつもと ゆきひろです

[#38399] Re: Enumerable#gather_each — "Akinori MUSHA" <knu@...> 2009/05/09

At Sat, 9 May 2009 15:30:20 +0900,

[#38405] Re: Enumerable#gather_each — Tanaka Akira <akr@...> 2009/05/10

In article <86r5yy2nrg.knu@iDaemons.org>,

[#38417] Re: Enumerable#gather_each — "Akinori MUSHA" <knu@...> 2009/05/10

At Sun, 10 May 2009 10:08:47 +0900,

[#38524] [Bug #1503] -Kuをつけた時、/[#{s}]/n と Regexp.new("[#{s}]",nil,"n") で実行結果が異なる — sinnichi eguchi <redmine@...>

Bug #1503: -Kuをつけた時、/[#{s}]/n と Regexp.new("[#{s}]",nil,"n") で実行結果が異なる

8 messages 2009/05/22

[ruby-dev:38457] Re: Enumerable#gather_each

From: Tanaka Akira <akr@...>
Date: 2009-05-15 04:24:34 UTC
List: ruby-dev #38457
In article <E1M4oSd-00005c-WB@x61.netlab.jp>,
  Yukihiro Matsumoto <matz@ruby-lang.org> writes:

> chunkにはこの意味で動詞にならないのが気になります。
> すでに出ていたslice_byとかがいいような気もします。

slice_by が気に入らないというわけではありませんが、

http://dictionary.reference.com/
で chunk をひくと

- verb (used with object)
5.      to cut, break, or form into chunks: Chunk that wedge of cheese and put the pieces on a plate.

とあるので、その意味での動詞もあるという見方もあるようです。

> が、田中さんが提案している機能全部(要素削除とか)はslice_byで
> は表現しきれないような気もしますが。

上記の続きで、

6.      to remove a chunk or chunks from (often fol. by out): Storms have chunked out the road. 

というように、除去するという意味にも使えるようです。

なお、slice_by は、slice_after との関係が気になります。
むしろ似ているから同じ語を使う、というのもあり得ますが。
-- 
[田中 哲][たなか あきら][Tanaka Akira]

In This Thread