@@ -10,30 +10,30 @@ def const_name(lowercase_name)
1010 lowercase_name . to_s . gsub ( /((?:\A \w )|(?:_\w ))/ ) { |x | x [ -1 ] . upcase }
1111 end
1212
13- def error_check action , status
13+ def error_check ( action , status )
1414 return if status == :ok
1515 raise RabbitMQ ::FFI ::Error . lookup ( status ) , "while #{ action } "
1616 end
1717
18- def null_check action , obj
18+ def null_check ( action , obj )
1919 return unless obj . nil?
2020 raise RabbitMQ ::FFI ::Error , "while #{ action } - got unexpected null"
2121 end
2222
23- def mem_ptr size , count : 1 , clear : true , release : true
23+ def mem_ptr ( size , count : 1 , clear : true , release : true )
2424 ptr = ::FFI ::MemoryPointer . new ( size , count , clear )
2525 ptr . autorelease = false unless release
2626 ptr
2727 end
2828
29- def strdup_ptr str , **kwargs
29+ def strdup_ptr ( str , **kwargs )
3030 str = str + "\x00 "
3131 ptr = mem_ptr ( str . bytesize , **kwargs )
3232 ptr . write_string ( str )
3333 ptr
3434 end
3535
36- def connection_info url = nil , **overrides
36+ def connection_info ( url = nil , **overrides )
3737 info = FFI ::ConnectionInfo . new
3838 FFI . amqp_default_connection_info ( info )
3939 result = info . to_h
0 commit comments