lib/noise/connection.rb in noise-ruby-0.1.0 vs lib/noise/connection.rb in noise-ruby-0.2.0
- old
+ new
@@ -20,11 +20,11 @@
def initialize(name)
@protocol = Protocol.create(name)
@handshake_started = false
@handshake_finished = false
@fn = nil
- @write_message_proc = lambda {|payload| write_message(payload)}
- @read_message_proc = lambda {|payload| read_message(payload)}
+ @write_message_proc = ->(payload) { write_message(payload) }
+ @read_message_proc = ->(payload) { read_message(payload) }
end
def prologue=(prologue)
@protocol.prologue = prologue
end