Results for: "Dir.chdir"

Deactivates the trace

Return true if trace was enabled. Return false if trace was disabled.

trace.enabled?       #=> true
trace.disable        #=> false (previous status)
trace.enabled?       #=> false
trace.disable        #=> false

If a block is given, the trace will only be disable within the scope of the block.

trace.enabled?
#=> true

trace.disable do
    trace.enabled?
    # only disabled for this block
end

trace.enabled?
#=> true

Note: You cannot access event hooks within the block.

trace.disable { p tp.lineno }
#=> RuntimeError: access from outside

Return the generated binding object from event

When RubyGems is required, Kernel#require is replaced with our own which is capable of loading gems on demand.

When you call require 'x', this is what happens:

The normal require functionality of returning false if that file has already been loaded is preserved.

Returns a Binding object, describing the variable and method bindings at the point of call. This object can be used when calling eval to execute the evaluated command in this environment. See also the description of class Binding.

def get_binding(param)
  binding
end
b = get_binding("hello")
eval("param", b)   #=> "hello"

Returns the first element, or the first n elements, of the enumerable. If the enumerable is empty, the first form returns nil, and the second form returns an empty array.

%w[foo bar baz].first     #=> "foo"
%w[foo bar baz].first(2)  #=> ["foo", "bar"]
%w[foo bar baz].first(10) #=> ["foo", "bar", "baz"]
[].first                  #=> nil
[].first(10)              #=> []

Returns a Digest subclass by name.

require 'openssl'

OpenSSL::Digest("MD5")
# => OpenSSL::Digest::MD5

Digest("Foo")
# => NameError: wrong constant name Foo

Returns a Digest subclass by name.

require 'openssl'

OpenSSL::Digest("MD5")
# => OpenSSL::Digest::MD5

Digest("Foo")
# => NameError: wrong constant name Foo

Change what’s displayed on the screen to reflect the current contents.

See GNU Readline’s rl_redisplay function.

Raises NotImplementedError if the using readline library does not support.

Disables garbage collection, returning true if garbage collection was already disabled.

GC.disable   #=> false
GC.disable   #=> true

Redirects to a path ending in /

Returns true if the entry is a directory (i.e., the value of the type fact is dir, cdir, or pdir).

No documentation available

Creates a new directory in the tar file name with mode

Returns a string usable in Dir.glob to match all requirable paths for this spec.

Make directories for index generation

The path where installed executables live

No documentation available

Iterates over keys and objects in a weakly referenced object

Calls the given block once for each key, value pair in the database.

Returns self.

Returns true if the MKD command may be used to create a new directory within the directory.

Returns the hash value of a given string. This is equivalent to Digest::Class.new(*parameters).digest(string), where extra parameters, if any, are passed through to the constructor and the string is passed to digest().

Returns the hex-encoded hash value of a given string. This is almost equivalent to Digest.hexencode(Digest::Class.new(*parameters).digest(string)).

Returns the base64 encoded hash value of a given string. The return value is properly padded with ‘=’ and contains no line feeds.

Enables or disables padding. By default encryption operations are padded using standard block padding and the padding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur.

See EVP_CIPHER_CTX_set_padding for further information.

Return the data hash computed with name Digest. name is either the long name or short name of a supported digest algorithm.

Examples

OpenSSL::Digest.digest("SHA256", "abc")

which is equivalent to:

OpenSSL::Digest::SHA256.digest("abc")
Search took: 3ms  ·  Total Results: 1119