Results for: "pstore"

If file_name is writable by others, returns an integer representing the file permission bits of file_name. Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2).

file_name can be an IO object.

File.world_writable?("/tmp")                  #=> 511
m = File.world_writable?("/tmp")
sprintf("%o", m)                              #=> "777"

Returns true if the named file is executable by the real user and group id of this process. See access(3).

Windows does not support execute permissions separately from read permissions. On Windows, a file is only considered executable if it ends in .bat, .cmd, .com, or .exe.

Note that some OS-level security features may cause this to return true even though the file is not executable by the real user/group.

Returns whether or not automatic compaction has been enabled.

Updates automatic compaction mode.

When enabled, the compactor will execute on every major collection.

Enabling compaction will degrade performance on major collections.

Returns information for heaps in the GC.

If the first optional argument, heap_name, is passed in and not nil, it returns a Hash containing information about the particular heap. Otherwise, it will return a Hash with heap names as keys and a Hash containing information about the heap as values.

If the second optional argument, hash_or_key, is given as Hash, it will be overwritten and returned. This is intended to avoid the probe effect.

If both optional arguments are passed in and the second optional argument is a symbol, it will return a Numeric of the value for the particular heap.

On CRuby, heap_name is of the type Integer but may be of type String on other implementations.

The contents of the hash are implementation specific and may change in the future without notice.

If the optional argument, hash, is given, it is overwritten and returned.

This method is only expected to work on CRuby.

The hash includes the following keys about the internal information in the GC:

slot_size

The slot size of the heap in bytes.

heap_allocatable_pages

The number of pages that can be allocated without triggering a new garbage collection cycle.

heap_eden_pages

The number of pages in the eden heap.

heap_eden_slots

The total number of slots in all of the pages in the eden heap.

heap_tomb_pages

The number of pages in the tomb heap. The tomb heap only contains pages that do not have any live objects.

heap_tomb_slots

The total number of slots in all of the pages in the tomb heap.

total_allocated_pages

The total number of pages that have been allocated in the heap.

total_freed_pages

The total number of pages that have been freed and released back to the system in the heap.

force_major_gc_count

The number of times major garbage collection cycles this heap has forced to start due to running out of free slots.

force_incremental_marking_finish_count

The number of times this heap has forced incremental marking to complete due to running out of pooled slots.

Return measured GC total time in nano seconds.

Returns a string containing the RFC-2045-compliant Base64-encoding of bin.

Per RFC 2045, the returned string may contain the URL-unsafe characters + or /; see Encoding Character Set above:

Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"

The returned string may include padding; see Padding above.

Base64.strict_encode64('*') # => "Kg==\n"

The returned string will have no newline characters, regardless of its length; see Newlines above:

Base64.strict_encode64('*') # => "Kg=="
Base64.strict_encode64('*' * 46)
# => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="

The string to be encoded may itself contain newlines, which will be encoded as ordinary Base64:

Base64.strict_encode64("\n\n\n") # => "CgoK"
s = "This is line 1\nThis is line 2\n"
Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"

Returns a string containing the decoding of an RFC-2045-compliant Base64-encoded string str:

s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"

Non-Base64 characters in str not allowed; see Encoding Character Set above: these include newline characters and characters - and /:

Base64.strict_decode64("\n") # Raises ArgumentError
Base64.strict_decode64('-')  # Raises ArgumentError
Base64.strict_decode64('_')  # Raises ArgumentError

Padding in str, if present, must be correct:

Base64.strict_decode64("MDEyMzQ1Njc")   # Raises ArgumentError
Base64.strict_decode64("MDEyMzQ1Njc=")  # => "01234567"
Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
No documentation available

Adds a post-build hook that will be passed an Gem::Installer instance when Gem::Installer#install is called. The hook is called after the gem has been extracted and extensions have been built but before the executables or gemspec has been written. If the hook returns false then the gem’s files will be removed and the install will be aborted.

Adds a post-installs hook that will be passed a Gem::DependencyInstaller and a list of installed specifications when Gem::DependencyInstaller#install is complete

Safely read a file in binary mode on all platforms.

Regexp for require-able path suffixes.

Is this a windows platform?

Is this a java platform?

Is this platform Solaris?

Looks for a gem dependency file at path and activates the gems in the file if found. If the file is not found an ArgumentError is raised.

If path is not given the RUBYGEMS_GEMDEPS environment variable is used, but if no file is found no exception is raised.

If ‘-’ is given for path RubyGems searches up from the current working directory for gem dependency files (gem.deps.rb, Gemfile, Isolate) and activates the gems in the first one found.

You can run this automatically when rubygems starts. To enable, set the RUBYGEMS_GEMDEPS environment variable to either the path of your gem dependencies file or “-” to auto-discover in parent directories.

NOTE: Enabling automatic discovery on multiuser systems can lead to execution of arbitrary code when used from directories outside your control.

No documentation available

The path to standard location of the user’s state file.

The path to standard location of the user’s state directory.

Default options for gem commands for Ruby implementers.

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.platform_defaults

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

end

Start a dRuby server locally.

The new dRuby server will become the primary server, even if another server is currently the primary server.

uri is the URI for the server to bind to. If nil, the server will bind to random port on the default local host name and use the default dRuby protocol.

front is the server’s front object. This may be nil.

config is the configuration for the new server. This may be nil.

See DRbServer::new.

Start a dRuby server locally.

The new dRuby server will become the primary server, even if another server is currently the primary server.

uri is the URI for the server to bind to. If nil, the server will bind to random port on the default local host name and use the default dRuby protocol.

front is the server’s front object. This may be nil.

config is the configuration for the new server. This may be nil.

See DRbServer::new.

Get the ‘current’ server.

In the context of execution taking place within the main thread of a dRuby server (typically, as a result of a remote call on the server or one of its objects), the current server is that server. Otherwise, the current server is the primary server.

If the above rule fails to find a server, a DRbServerNotFound error is raised.

Get the ‘current’ server.

In the context of execution taking place within the main thread of a dRuby server (typically, as a result of a remote call on the server or one of its objects), the current server is that server. Otherwise, the current server is the primary server.

If the above rule fails to find a server, a DRbServerNotFound error is raised.

Search took: 6ms  ·  Total Results: 3855