lambda{} want to have 0 arguments and raises ArgumentError.

proc{} doesn't.
This commit is contained in:
Denis Knauf 2011-07-06 05:23:46 -07:00
parent 66ce7eb209
commit 17f3768453

View file

@ -19,8 +19,8 @@ class Select
def initialize timeout = 30 def initialize timeout = 30
@read, @write, @error = {}, {}, {} @read, @write, @error = {}, {}, {}
@read.default = @write.default = @error.default = lambda{} @read.default = @write.default = @error.default = proc{}
@timeout, @tevent, @exit, @exit_on_empty = timeout, lambda{}, false, true @timeout, @tevent, @exit, @exit_on_empty = timeout, proc{}, false, true
end end
def timeout timeout = nil, &event def timeout timeout = nil, &event