[#41531] [Bug #3385] ext/dbm: accept various version of db — Takahiro Kambe <redmine@...>
Bug #3385: ext/dbm: accept various version of db
2010年6月3日23:38 Takahiro Kambe <redmine@ruby-lang.org>:
2011年11月12日8:14 Tanaka Akira <akr@fsij.org>:
[#41536] RUBY_DEBUG=gc_stress [FATAL] failed to allocate memory — Tanaka Akira <akr@...>
コンパイル時に RUBY_DEBUG_ENV というマクロを定義しておくと、
[#41543] [Bug #3398] 1.9.2 SEGV during test-all — Yuki Sonoda <redmine@...>
Bug #3398: 1.9.2 SEGV during test-all
[#41597] [Bug #3433] Error that occurs by BasicSocket#sendmsg — Masaya Tarui <redmine@...>
Bug #3433: Error that occurs by BasicSocket#sendmsg
[#41600] 質問・提案:cgi.rbの後継となるライブラリについて — Dice <tetradice@...>
Diceです。cgi.rbの後継ライブラリについて質問させてください。
藤岡です。
かくたにです。
藤岡さん、かくたにさん、返信ありがとうございます。
藤岡です。
Diceです。藤岡さん、返信ありがとうございます。
[#41610] [Bug #3443] requireが遅くなる — Yusuke Endoh <redmine@...>
Bug #3443: requireが遅くなる
[#41623] [Feature:trunk] argument delegation — Nobuyoshi Nakada <nobu@...>
なかだです。
遠藤です。
まつもと ゆきひろです
前田です。
[#41672] [Bug #3463] 1.9.2-preview3 で [BUG] gc_sweep(): unknown data type 0x0 — Tomoyuki Chikanaga <redmine@...>
チケット #3463 が更新されました。 (by Tomoyuki Chikanaga)
[#41674] [Bug #3464] win32ole failure load TYPELIB on mswin64 vista — sakiyama shin <redmine@...>
Bug #3464: win32ole failure load TYPELIB on mswin64 vista
[#41702] WIN32OLE_METHOD offset_vtbl — kuwamoto shintaro <beuniv@...>
こんばんわ
助田です。
こんにちは、なかむら(う)です。
助田です。
artonです。
2010/6/24 arton <artonx@yahoo.co.jp>:
[#41705] [Bug #3471][Rejected] ./miniruby sample/test.rbで1NotOK — Shyouhei Urabe <redmine@...>
チケット #3471 が更新されました。 (by Shyouhei Urabe)
2010年6月24日16:53 Shyouhei Urabe <redmine@ruby-lang.org>:
[#41711] [Bug #3473] make clear-installed-list — Usaku NAKAMURA <redmine@...>
Bug #3473: make clear-installed-list
[#41730] (ruby/tk) ruby_1_9_2 への backport — Hidetoshi NAGAI <nagai@...>
永井@知能.九工大です.
[#41752] [Bug #3490][Assigned] test_pack_utf8 failure on mswin64 — Yusuke Endoh <redmine@...>
チケット #3490 が更新されました。 (by Yusuke Endoh)
[#41760] Hash[] の引数が Array の場合の振る舞い — とみたまさひろ <tommy@...>
とみたです。
[ruby-dev:41644] Re: [Feature:trunk] argument delegation
遠藤です。
2010年6月17日6:31 Yukihiro Matsumoto <matz@ruby-lang.org>:
> |(1) ブロックを引き継がせたいだけ (引数は変えたい) ときに不便
> (1) (略) 今回の動機は「ひとつのことをするのに、ふ
> たつのことを書かないといけない」という冗長性ですから。
なるほど。「通常の引数とブロック引数をまとめて delegate したい」
と感じたことがあまりなかったので、動機を勘違いしていました。
lib/ を粗っぽく探してみたら、24 箇所ほど見つかりました (メールの
最後に貼りつけてあります) 。それなりに需要はあるのかな。
> が、もともとの動機とは別として、「&」1文字でそのコンテキスト
> のブロックを渡すのは、面白いアイディアだと思います。この場合
> は、仮引数リストのブロック引数がなくても、ブロックを渡すこと
> になるんですかね。
通常の引数は関係なく、ブロック引数を引き継がせたい事例なら、上と
同じような検索で 183 箇所 (上の 24 箇所を含む) も見つかったので、
& の省略記法は是非欲しくなってきました。
$ ruby check.rb
lib/drb/drb.rb
1079: def method_missing(msg_id, *a, &b)
1083: return obj.__send__(msg_id, *a, &b)
lib/test/unit/assertions.rb
22: def assert_raise(*args, &b)
23: assert_raises(*args, &b)
lib/rake.rb
743: def create_rule(*args, &block)
744: Rake.application.create_rule(*args, &block)
lib/rake.rb
844:def task(*args, &block)
845: Rake::Task.define_task(*args, &block)
lib/rake.rb
862:def file(*args, &block)
863: Rake::FileTask.define_task(*args, &block)
lib/rake.rb
868:def file_create(args, &block)
869: Rake::FileCreationTask.define_task(args, &block)
lib/rake.rb
892:def multitask(args, &block)
893: Rake::MultiTask.define_task(args, &block)
lib/rake.rb
918:def rule(*args, &block)
919: Rake::Task.create_rule(*args, &block)
lib/scanf.rb
607: def scanf(str,&b)
608: return block_scanf(str,&b) if b
lib/scanf.rb
687: def scanf(fstr,&b)
689: block_scanf(fstr,&b)
lib/scanf.rb
716: def scanf(fs,&b)
717: STDIN.scanf(fs,&b)
lib/rubygems/user_interaction.rb
62: def use_ui(new_ui, &block)
63: Gem::DefaultUserInteraction.use_ui(new_ui, &block)
lib/optparse.rb
832: def accept(*args, &blk) top.accept(*args, &blk) end
836: def self.accept(*args, &blk) top.accept(*args, &blk) end
lib/optparse.rb
1202: def on(*opts, &block)
1203: define(*opts, &block)
lib/optparse.rb
1216: def on_head(*opts, &block)
1217: define_head(*opts, &block)
lib/optparse.rb
1230: def on_tail(*opts, &block)
1231: define_tail(*opts, &block)
lib/optparse.rb
1425: def visit(id, *args, &block)
1427: el.send(id, *args, &block)
lib/csv.rb
2308:def CSV(*args, &block)
2309: CSV.instance(*args, &block)
lib/erb.rb
334: def percent_line(line, &block)
336: return @scan_line.call(line, &block)
lib/erb.rb
334: def percent_line(line, &block)
341: @scan_line.call(line, &block)
lib/matrix.rb
1457: def map2(v, &block) # :yield: e1, e2
1459: els = collect2(v, &block)
lib/set.rb
613: def initialize(*args, &block) # :nodoc:
615: initialize(*args, &block)
lib/delegate.rb
141: def method_missing(m, *args, &block)
144: target.respond_to?(m) ? target.__send__(m, *args, &block) :
super(m, *args, &block)
lib/open-uri.rb
27: def open(name, *rest, &block) # :doc:
35: open_uri_original_open(name, *rest, &block)
count: 24
$ cat check.rb
count = 0
Dir.glob("lib/**/*.rb").each do |path|
next unless File.file?(path)
open(path) do |file|
while line = file.gets
if line =~ /^(\s*)def\s+[\d\w]+(\(.*,.*&.*\))/ # 両方引き継がせる事例
#if line =~ /^(\s*)def\s+[\d\w]+\(.*(&.*\))/ # ブロック引数を引き継がせる事例
sig = line
lineno = file.lineno
re1 = /^\s{#{ $1.size }}end/
re2 = Regexp.new(Regexp.quote($2))
while line = file.gets
break if re1 =~ line
if re2 =~ line
puts path
puts "#{ lineno }:#{ sig }"
puts "#{ file.lineno }:#{ line }"
puts
count += 1
end
end
end
end
end
end
puts "count: #{ count }"
--
Yusuke Endoh <mame@tsg.ne.jp>