Results for: "minmax"

For debugging the Ruby/OpenSSL library. Calls CRYPTO_mem_leaks_fp(stderr). Prints detected memory leaks to standard error. This cleans the global state up thus you cannot use any methods of the library after calling this.

Returns true if leaks detected, false otherwise.

This is available only when built with a capable OpenSSL and –enable-debug configure option.

Example

OpenSSL.mem_check_start
NOT_GCED = OpenSSL::PKey::RSA.new(256)

END {
  GC.start
  OpenSSL.print_mem_leaks # will print the leakage
}

Specifies a Proc object proc to determine if a character in the user’s input is escaped. It should take the user’s input and the index of the character in question as input, and return a boolean (true if the specified character is escaped).

Readline will only call this proc with characters specified in completer_quote_characters, to discover if they indicate the end of a quoted argument, or characters specified in completer_word_break_characters, to discover if they indicate a break between arguments.

If completer_quote_characters is not set, or if the user input doesn’t contain one of the completer_quote_characters or a ++ character, Readline will not attempt to use this proc at all.

Raises ArgumentError if proc does not respond to the call method.

Returns the quoting detection Proc object.

Specifies VI editing mode. See the manual of GNU Readline for details of VI editing mode.

Raises NotImplementedError if the using readline library does not support.

Returns true if vi mode is active. Returns false if not.

Raises NotImplementedError if the using readline library does not support.

Specifies a Proc object proc to call after the first prompt has been printed and just before readline starts reading input characters.

See GNU Readline’s rl_pre_input_hook variable.

Raises ArgumentError if proc does not respond to the call method.

Raises NotImplementedError if the using readline library does not support.

Returns a Proc object proc to call after the first prompt has been printed and just before readline starts reading input characters. The default is nil.

Raises NotImplementedError if the using readline library does not support.

Verify internal consistency.

This method is implementation specific. Now this method checks generational consistency if RGenGC is supported.

Returns the size of memory allocated by malloc().

Only available if ruby was built with CALC_EXACT_MALLOC_SIZE.

Returns information about the most recent garbage collection.

Returns a list of paths matching glob from the latest gems that can be used by a gem to pick up features from other gems. For example:

Gem.find_latest_files('rdoc/discover').each do |path| load path end

if check_load_path is true (the default), then find_latest_files also searches $LOAD_PATH for files as well as gems.

Unlike find_files, find_latest_files will return only files from the latest version of a gem.

Find all ‘rubygems_plugin’ files in $LOAD_PATH and load them

Deduce Ruby’s –program-prefix and –program-suffix from its install name

Default options for gem commands for Ruby packagers.

The options here should be structured as an array of string “gem” command names as keys and a string of the default options as values.

Example:

def self.operating_system_defaults

{
    'install' => '--no-rdoc --no-ri --env-shebang',
    'update' => '--no-rdoc --no-ri --env-shebang'
}

end

Set the default id conversion object.

This is expected to be an instance such as DRb::DRbIdConv that responds to to_id and to_obj that can convert objects to and from DRb references.

See DRbServer#default_id_conv.

Set the default id conversion object.

This is expected to be an instance such as DRb::DRbIdConv that responds to to_id and to_obj that can convert objects to and from DRb references.

See DRbServer#default_id_conv.

Shortcut for defining multiple delegator methods, but with no provision for using a different name. The following two code samples have the same effect:

def_delegators :@records, :size, :<<, :map

def_delegator :@records, :size
def_delegator :@records, :<<
def_delegator :@records, :map

Define method as delegator instance method with an optional alias name ali. Method calls to ali will be delegated to accessor.method. accessor should be a method name, instance variable name, or constant name. Use the full path to the constant if providing the constant name. Returns the name of the method defined.

class MyQueue
  CONST = 1
  extend Forwardable
  attr_reader :queue
  def initialize
    @queue = []
  end

  def_delegator :@queue, :push, :mypush
  def_delegator 'MyQueue::CONST', :to_i
end

q = MyQueue.new
q.mypush 42
q.queue    #=> [42]
q.push 23  #=> NoMethodError
q.to_i     #=> 1

Shortcut for defining multiple delegator methods, but with no provision for using a different name. The following two code samples have the same effect:

def_delegators :@records, :size, :<<, :map

def_delegator :@records, :size
def_delegator :@records, :<<
def_delegator :@records, :map

Defines a method method which delegates to accessor (i.e. it calls the method of the same name in accessor). If new_name is provided, it is used as the name for the delegate method. Returns the name of the method defined.

No documentation available

The line number in the source code where this AST’s text began.

The line number in the source code where this AST’s text ended.

No documentation available
No documentation available
Search took: 4ms  ·  Total Results: 2065