Kouhei Sutou
null+****@clear*****
Tue Oct 29 18:39:26 JST 2013
Kouhei Sutou 2013-10-29 18:39:26 +0900 (Tue, 29 Oct 2013) New Revision: d05e0de320a001d219549f7e7991c4d5f1a1012d https://github.com/droonga/fluent-plugin-droonga/commit/d05e0de320a001d219549f7e7991c4d5f1a1012d Message: Really use File.open with a block Modified files: benchmark/watch/benchmark-notify.rb Modified: benchmark/watch/benchmark-notify.rb (+3 -1) =================================================================== --- benchmark/watch/benchmark-notify.rb 2013-10-29 18:39:13 +0900 (d9f6bf0) +++ benchmark/watch/benchmark-notify.rb 2013-10-29 18:39:26 +0900 (64de5d5) @@ -47,9 +47,11 @@ class NotifyBenchmark def setup ddl_path = File.expand_path(File.join(__FILE__, "..", "..", "..", "ddl", "watchdb.jsons")) - File.open(ddl_path, "r").each do |part| + File.open(ddl_path, "r") do |file| + file.each_line do |part| message = JSON.parse(part) @client.connection.send_receive(message) + end end add_subscribers(@params[:n_initial_subscribers]) end -------------- next part -------------- HTML����������������������������... Download