Results for: "strip"

Returns information about object moved in the most recent GC compaction.

The returned hash contains the following keys:

considered

Hash containing the type of the object as the key and the number of objects of that type that were considered for movement.

moved

Hash containing the type of the object as the key and the number of objects of that type that were actually moved.

moved_up

Hash containing the type of the object as the key and the number of objects of that type that were increased in size.

moved_down

Hash containing the type of the object as the key and the number of objects of that type that were decreased in size.

Some objects can’t be moved (due to pinning) so these numbers can be used to calculate compaction efficiency.

Returns information about the most recent garbage collection.

If the optional argument, hash, is given, it is overwritten and returned. This is intended to avoid probe effect.

Verify compaction reference consistency.

This method is implementation specific. During compaction, objects that were moved are replaced with T_MOVED objects. No object should have a reference to a T_MOVED object after compaction.

This function expands the heap to ensure room to move all objects, compacts the heap to make sure everything moves, updates all references, then performs a full GC. If any object contains a reference to a T_MOVED object, that object should be pushed on the mark stack, and will make a SEGV.

Quietly ensure the Gem directory dir contains all the proper subdirectories. If we can’t create a directory due to a permission problem, then we will silently continue.

If mode is given, missing directories are created with this mode.

World-writable directories will never be created.

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.

Returns the latest release-version specification for the gem name.

Returns the latest release version of RubyGems.

Returns the version of the latest release-version of gem name

Register a Gem::Specification for default gem.

Two formats for the specification are supported:

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

Securely removes the entry given by path, which should be the entry for a regular file, a symbolic link, or a directory.

Argument path should be interpretable as a path.

Avoids a local vulnerability that can exist in certain circumstances; see Avoiding the TOCTTOU Vulnerability.

Optional argument force specifies whether to ignore raised exceptions of StandardError and its descendants.

Related: methods for deleting.

Securely removes the entry given by path, which should be the entry for a regular file, a symbolic link, or a directory.

Argument path should be interpretable as a path.

Avoids a local vulnerability that can exist in certain circumstances; see Avoiding the TOCTTOU Vulnerability.

Optional argument force specifies whether to ignore raised exceptions of StandardError and its descendants.

Related: methods for deleting.

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

Like URI.encode_www_form_component, except that ' ' (space) is encoded as '%20' (instead of '+').

Like URI.decode_www_form_component, except that '+' is preserved.

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

SyntaxSuggest.use_prism_parser? [Private]

Tells us if the prism parser is available for use or if we should fallback to ‘Ripper`

@@foo += bar ^^^^^^^^^^^^

@@foo &&= bar ^^^^^^^^^^^^^

@@foo ||= bar ^^^^^^^^^^^^^

Visit a constant path that is part of a write node.

Search took: 5ms  ·  Total Results: 2417