Results for: "Dir.chdir"

Parses environment variable env or its uppercase with splitting like a shell.

env defaults to the basename of the program.

Returns the binding associated with prc.

def fred(param)
  proc {}
end

b = fred(99)
eval("param", b.binding)   #=> 99

Deactivates the trace

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

trace.enabled?      #=> true
trace.disable       #=> true (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).

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
No documentation available

Iterates over keys and objects in a weakly referenced object

No documentation available

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 factorization of self.

See Prime#prime_division for more details.

Passes each character in str to the given block, or returns an enumerator if no block is given.

"hello".each_char {|c| print c, ' ' }

produces:

h e l l o
Search took: 4ms  ·  Total Results: 1210