Results for: "fnmatch"

No documentation available

Enumerates the outdated local gems yielding the local specification and the latest remote version.

This method may take some time to return as it must check each local gem against the server’s index.

Returns a Hash containing the following keys:

:accept

Number of started SSL/TLS handshakes in server mode

:accept_good

Number of established SSL/TLS sessions in server mode

:accept_renegotiate

Number of start renegotiations in server mode

:cache_full

Number of sessions that were removed due to cache overflow

:cache_hits

Number of successfully reused connections

:cache_misses

Number of sessions proposed by clients that were not found in the cache

:cache_num

Number of sessions in the internal session cache

:cb_hits

Number of sessions retrieved from the external cache in server mode

:connect

Number of started SSL/TLS handshakes in client mode

:connect_good

Number of established SSL/TLS sessions in client mode

:connect_renegotiate

Number of start renegotiations in client mode

:timeouts

Number of sessions proposed by clients that were found in the cache but had expired due to timeouts

Enables use of shared session key material in accordance with RFC 5705.

Returns true if key is the corresponding private key to the Subject Public Key Information, false otherwise.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Like Enumerable#map, but chains operation to be lazy-evaluated.

(1..Float::INFINITY).lazy.map {|i| i**2 }
#=> #<Enumerator::Lazy: #<Enumerator::Lazy: 1..Infinity>:map>
(1..Float::INFINITY).lazy.map {|i| i**2 }.first(3)
#=> [1, 4, 9]

Like Enumerable#chunk, but chains operation to be lazy-evaluated.

Iterates over the elements of the first enumerable by calling the “each” method on it with the given arguments, then proceeds to the following enumerables in sequence until all of the enumerables are exhausted.

If no block is given, returns an enumerator.

Iterates over the elements of the first enumerable by calling the “each_entry” method on it with the given arguments, then proceeds to the following enumerables in sequence until all of the enumerables are exhausted.

If no block is given, returns an enumerator. Otherwise, returns self.

No documentation available

Update the digest using given string and return self.

Update the digest using a given string and return self.

Iterates for each entry in the /etc/passwd file if a block is given.

If no block is given, returns the Enumerator.

The code block is passed an Passwd struct.

See Etc.getpwent above for details.

Example:

require 'etc'

Etc::Passwd.each {|u|
  puts u.name + " = " + u.gecos
}

Etc::Passwd.collect {|u| u.gecos}
Etc::Passwd.collect {|u| u.gecos}

Iterates for each entry in the /etc/group file if a block is given.

If no block is given, returns the Enumerator.

The code block is passed a Group struct.

Example:

require 'etc'

Etc::Group.each {|g|
  puts g.name + ": " + g.mem.join(', ')
}

Etc::Group.collect {|g| g.name}
Etc::Group.select {|g| !g.mem.empty?}

Create a new closure. If a block is given, the created closure is automatically freed after the given block is executed.

The all given arguments are passed to Fiddle::Closure.new. So using this method without block equals to Fiddle::Closure.new.

Example

Fiddle::Closure.create(TYPE_INT, [TYPE_INT]) do |closure|
  # closure is freed automatically when this block is finished.
end
No documentation available
No documentation available

Allocates a C struct with the types provided.

See Fiddle::Pointer.malloc for memory management issues.

Examples

# Automatically freeing the pointer when the block is exited - recommended
Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) do |pointer|
  ...
end

# Manually freeing but relying on the garbage collector otherwise
pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE)
...
pointer.call_free

# Relying on the garbage collector - may lead to unlimited memory allocated before freeing any, but safe
pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE)
...

# Only manually freeing
pointer = Fiddle::Pointer.malloc(size)
begin
  ...
ensure
  Fiddle.free pointer
end

# No free function and no call to free - the native memory will leak if the pointer is garbage collected
pointer = Fiddle::Pointer.malloc(size)
...

Allocate size bytes of memory and associate it with an optional freefunc.

If a block is supplied, the pointer will be yielded to the block instead of being returned, and the return value of the block will be returned. A freefunc must be supplied if a block is.

If a freefunc is supplied it will be called once, when the pointer is garbage collected or when the block is left if a block is supplied or when the user calls call_free, whichever happens first. freefunc must be an address pointing to a function or an instance of Fiddle::Function.

Search took: 3ms  ·  Total Results: 1850