Kouhei Sutou
kou****@clear*****
Thu May 8 17:00:18 JST 2014
> - @payload.each_line do |node| > + @payload.each do |node| ここはeach_lineのままでいいですよ。 行ごとに処理したいんですよね? In <8c5da67c0d633bd4ba3a9a4de1caa617901f6aa2 �� jenkins.clear-code.com> "[Groonga-commit] droonga/droonga-engine �� 8c5da67 [master] Use $stdin instead of STDIN" on Thu, 08 May 2014 16:56:39 +0900, YUKI Hiroshi <null+groonga �� clear-code.com> wrote: > YUKI Hiroshi 2014-05-08 16:56:39 +0900 (Thu, 08 May 2014) > > New Revision: 8c5da67c0d633bd4ba3a9a4de1caa617901f6aa2 > https://github.com/droonga/droonga-engine/commit/8c5da67c0d633bd4ba3a9a4de1caa617901f6aa2 > > Message: > Use $stdin instead of STDIN > > Modified files: > lib/droonga/serf_event_handler.rb > > Modified: lib/droonga/serf_event_handler.rb (+2 -2) > =================================================================== > --- lib/droonga/serf_event_handler.rb 2014-05-08 16:54:11 +0900 (a89e162) > +++ lib/droonga/serf_event_handler.rb 2014-05-08 16:56:39 +0900 (a887273) > @@ -54,12 +54,12 @@ module Droonga > @event_name += ":#{ENV["SERF_USER_QUERY"]}" > end > > - @payload = STDIN.read > + @payload = $stdin > end > > def changed_nodes > nodes = {} > - @payload.each_line do |node| > + @payload.each do |node| > name, address, role, tags = node.strip.split(/\s+/) > nodes[name] = { > "address" => address,