[#39052] Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yugui <yugui@...>

Redmine管理用プロジェクトに報告されてしまったので転送します。

12 messages 2009/08/09
[#39264] Re: Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yutaka Kanemoto <kinpoco@...> 2009/09/08

金本と申します。

[#39107] [Bug #1952] cannot stop with Ctrl+C — Usaku NAKAMURA <redmine@...>

Bug #1952: cannot stop with Ctrl+C

14 messages 2009/08/18

[#39167] [Bug #2000] Change the license to "GPLv2+ or Ruby's original". — Mamoru Tasaka <redmine@...>

Bug #2000: Change the license to "GPLv2+ or Ruby's original".

11 messages 2009/08/26

[#39193] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...>

In article <200908281827.n7SIRbaX003476@ci.ruby-lang.org>,

16 messages 2009/08/29
[#39194] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39195] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a988633.9553f10a.4496.483e@mx.google.com>,

[#39196] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39197] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a989f76.1602be0a.3de4.1131@mx.google.com>,

[#39198] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Yukihiro Matsumoto <matz@...> 2009/08/29

まつもと ゆきひろです

[#39206] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/31

なかだです。

[ruby-dev:39125] Re: StopIteration#result

From: Tanaka Akira <akr@...>
Date: 2009-08-19 04:07:56 UTC
List: ruby-dev #39125
In article <E1Mdbz8-0001of-LY@x61.netlab.jp>,
  Yukihiro Matsumoto <matz@ruby-lang.org> writes:

> Pythonからいただいて、sendというのはどうでしょう。Pythonでは
> 値を渡すのと得るのが同じメソッドになっていますが、Rubyでは分
> 離するということで。ああ、でも send はRuby的には面倒な名前か
> なあ。__send__があるとはいえ。

うぅむ。send という名前は重なっているので可能なら避けたいと
ころです。

ためしに外部イテレータで内部イテレータを実現するのを書いてみ
ると例えばこうなります。

def each_by_extiter(e)
  while true
    begin
      v = e.next
    rescue StopIteration
      return $!.result  
    end
    yield_value = yield v
    # e.send v
  end
end
a = [1,2,3]
e = a.each
p each_by_extiter(e) {|x| p x }

うぅむ。e.next が単値なのがよろしくありませんな。返り値にす
るときにひとつの値にまとまって、情報が落ちています。

  o = Object.new
  def o.each
    yield 1,2
  end
  o.each {|*x| p x }              #=> [1, 2]
  e = o.enum_for(:each)
  each_by_extiter(e) {|*x| p x }  #=> [[1, 2]]

というようにすると、違いがわかります。

まぁ、常に配列を返す Enumerator#{next_values,peek_values} の
追加ですかね。
-- 
[田中 哲][たなか あきら][Tanaka Akira]

In This Thread