mirror of
https://github.com/meineerde/rackstash.git
synced 2026-02-01 01:37:12 +00:00
Stop splatting clean hash argument in Bufferstack#push
The optional keyword arguments are already cleaned by the keyword splat in BufferStack#push. They are automatically unsplatted when calling Buffer#initialize anyway.
This commit is contained in:
parent
f92bde5af2
commit
c370aecbcd
@ -47,8 +47,8 @@ module Rackstash
|
||||
# @param buffer_args [Hash<Symbol => Object>] optional arguments for the new
|
||||
# {Buffer}. See {Buffer#initialize} for allowed values.
|
||||
# @return [Buffer] the newly created buffer
|
||||
def push(**buffer_args)
|
||||
buffer = Buffer.new(sink, **buffer_args)
|
||||
def push(buffer_args = {})
|
||||
buffer = Buffer.new(sink, buffer_args)
|
||||
@stack_mutex.synchronize do
|
||||
@stack.push buffer
|
||||
end
|
||||
|
||||
@ -376,10 +376,10 @@ module Rackstash
|
||||
# @param buffer_args [Hash<Symbol => Object>] optional arguments for the new
|
||||
# {Buffer}. See {Buffer#initialize} for allowed values.
|
||||
# @return [Object] the return value of the block
|
||||
def with_buffer(**buffer_args)
|
||||
def with_buffer(buffer_args = {})
|
||||
raise ArgumentError, 'block required' unless block_given?
|
||||
|
||||
buffer_stack.push(**buffer_args)
|
||||
buffer_stack.push(buffer_args)
|
||||
begin
|
||||
yield
|
||||
ensure
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user