Results for: "minmax"

No documentation available
No documentation available
No documentation available

Return the best specification that contains the file matching path amongst the specs that are not activated.

Search through all unresolved deps and sub-dependencies and return specs that contain the file matching path.

No documentation available
No documentation available

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

No documentation available
No documentation available

Find cached filename in Gem.path. Returns nil if the file cannot be found.

No documentation available

This method is deprecated and should not be used. This is a no-op.

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]

Rewinds the enumerator chain by calling the “rewind” method on each enumerable in reverse order. Each call is performed only if the enumerable responds to the method.

Returns a printable version of the enumerator chain.

Rewinds the product enumerator by calling the “rewind” method on each enumerable in reverse order. Each call is performed only if the enumerable responds to the method.

Returns a printable version of the product enumerator.

Returns the number that defines the first element of this arithmetic sequence.

Convert this arithmetic sequence to a printable form.

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.

Returns a string formatted with an easily readable representation of the internal state of the pointer.

See Object#inspect.

Search took: 4ms  ·  Total Results: 2220