[Groonga-commit] droonga/droonga-engine at 394b3e8 [master] Simplify

Back to archive index

Kouhei Sutou kou****@clear*****
Thu Apr 23 12:37:25 JST 2015


> -        on_readable = lambda do
> -          receive_heartbeat
> -        end
>          @watcher.on_readable do
> -          on_readable.call
> +          receive_heartbeat
>          end

実は、これが動くようになったのはCool.io 1.3.0からなんですよ。

https://github.com/tarcieri/cool.io/blob/master/CHANGES.md

の

  Block evaluation doesn't change self for keeping
  consistency with Ruby block

がそれです。

なので、Cool.ioの要求バージョンを1.3.0以降にしておいてもらえ
ますか?

In <394b3e813cd35cb7810b320491d6f2fc8929a505 �� jenkins.clear-code.com>
  "[Groonga-commit] droonga/droonga-engine �� 394b3e8 [master] Simplify" on Wed, 22 Apr 2015 16:25:07 +0900,
  YUKI Hiroshi <null+groonga �� clear-code.com> wrote:

> YUKI Hiroshi	2015-04-22 16:25:07 +0900 (Wed, 22 Apr 2015)
> 
>   New Revision: 394b3e813cd35cb7810b320491d6f2fc8929a505
>   https://github.com/droonga/droonga-engine/commit/394b3e813cd35cb7810b320491d6f2fc8929a505
> 
>   Message:
>     Simplify
> 
>   Modified files:
>     lib/droonga/fluent_message_receiver.rb
> 
>   Modified: lib/droonga/fluent_message_receiver.rb (+3 -12)
> ===================================================================
> --- lib/droonga/fluent_message_receiver.rb    2015-04-22 15:43:24 +0900 (4b2cd00)
> +++ lib/droonga/fluent_message_receiver.rb    2015-04-22 16:25:07 +0900 (0dc6705)
> @@ -141,11 +141,8 @@ module Droonga
>          @socket = UDPSocket.for_fd(@fd)
>  
>          @watcher = Coolio::IOWatcher.new(@socket, "r")
> -        on_readable = lambda do
> -          receive_heartbeat
> -        end
>          @watcher.on_readable do
> -          on_readable.call
> +          receive_heartbeat
>          end
>          @loop.attach(@watcher)
>          # logger.trace("start: new heartbeat watcher attached",
> @@ -199,20 +196,14 @@ module Droonga
>          @on_close = nil
>          @unpacker = MessagePack::Unpacker.new
>  
> -        on_read = lambda do |data|
> -          feed(data)
> -        end
>          @io.on_read do |data|
> -          on_read.call(data)
> +          feed(data)
>          end
>  
> -        on_close = lambda do
> +        @io.on_close do
>            @io = nil
>            @on_close.call if @on_close
>          end
> -        @io.on_close do
> -          on_close.call
> -        end
>        end
>  
>        def close




More information about the Groonga-commit mailing list
Back to archive index