Results for: "remove_const"

No documentation available

Returns whether or not the constant const is defined.

See also have_const

Remove previously defined command-line argument name.

This method removes a file system entry path. path shall be a regular file, a directory, or something. If path is a directory, remove it recursively. This method is required to avoid TOCTTOU (time-of-check-to-time-of-use) local security vulnerability of rm_r. rm_r causes security hole when:

To avoid this security hole, this method applies special preprocess. If path is a directory, this method chown(2) and chmod(2) all removing directories. This requires the current process is the owner of the removing whole directory tree, or is the super user (root).

WARNING: You must ensure that ALL parent directories cannot be moved by other untrusted users. For example, parent directories should not be owned by untrusted users, and should not be world writable except when the sticky bit set.

WARNING: Only the owner of the removing directory tree, or Unix super user (root) should invoke this method. Otherwise this method does not work.

For details of this security vulnerability, see Perl’s case:

For fileutils.rb, this vulnerability is reported in [ruby-dev:26100].

This method removes a file system entry path. path shall be a regular file, a directory, or something. If path is a directory, remove it recursively. This method is required to avoid TOCTTOU (time-of-check-to-time-of-use) local security vulnerability of rm_r. rm_r causes security hole when:

To avoid this security hole, this method applies special preprocess. If path is a directory, this method chown(2) and chmod(2) all removing directories. This requires the current process is the owner of the removing whole directory tree, or is the super user (root).

WARNING: You must ensure that ALL parent directories cannot be moved by other untrusted users. For example, parent directories should not be owned by untrusted users, and should not be world writable except when the sticky bit set.

WARNING: Only the owner of the removing directory tree, or Unix super user (root) should invoke this method. Otherwise this method does not work.

For details of this security vulnerability, see Perl’s case:

For fileutils.rb, this vulnerability is reported in [ruby-dev:26100].

Removes the definition of the sym, returning that constant’s value.

class Dummy
  @@var = 99
  puts @@var
  remove_class_variable(:@@var)
  p(defined? @@var)
end

produces:

99
nil

Removes installed executables and batch files (windows only) for gemspec.

Removes all gems in list.

NOTE: removes uninstalled gems from list.

No longer raises NoMemoryError when allocating an instance of the given classes.

Removes the response handler.

Remove the oldest DependencyRequest from the list.

Returns the Ruby source filename and line number containing first definition of constant specified. If the named constant is not found, nil is returned. If the constant is found, but its source location can not be extracted (constant is defined in C code), empty array is returned.

inherit specifies whether to lookup in mod.ancestors (true by default).

# test.rb:
class A
  C1 = 1
end

module M
  C2 = 2
end

class B < A
  include M
  C3 = 3
end

class A # continuation of A definition
end

p B.const_source_location('C3')           # => ["test.rb", 11]
p B.const_source_location('C2')           # => ["test.rb", 6]
p B.const_source_location('C1')           # => ["test.rb", 2]

p B.const_source_location('C2', false)    # => nil  -- don't lookup in ancestors

p Object.const_source_location('B')       # => ["test.rb", 9]
p Object.const_source_location('A')       # => ["test.rb", 1]  -- note it is first entry, not "continuation"

p B.const_source_location('A')            # => ["test.rb", 1]  -- because Object is in ancestors
p M.const_source_location('A')            # => ["test.rb", 1]  -- Object is not ancestor, but additionally checked for modules

p Object.const_source_location('A::C1')   # => ["test.rb", 2]  -- nesting is supported
p Object.const_source_location('String')  # => []  -- constant is defined in C code

Removes session from the session cache.

No documentation available
No documentation available

Removes the gemspec matching full_name from the dependency list

Remove everything in the DependencyList that matches but doesn’t satisfy items in dependencies (a hash of gem names to arrays of dependencies).

No documentation available

Remove custom handling of requests for files with suffix

No documentation available
No documentation available

The parent class for all constructed encodings. The value attribute of a Constructive is always an Array. Attributes are the same as for ASN1Data, with the addition of tagging.

SET and SEQUENCE

Most constructed encodings come in the form of a SET or a SEQUENCE. These encodings are represented by one of the two sub-classes of Constructive:

Please note that tagged sequences and sets are still parsed as instances of ASN1Data. Find further details on tagged values there.

Example - constructing a SEQUENCE

int = OpenSSL::ASN1::Integer.new(1)
str = OpenSSL::ASN1::PrintableString.new('abc')
sequence = OpenSSL::ASN1::Sequence.new( [ int, str ] )

Example - constructing a SET

int = OpenSSL::ASN1::Integer.new(1)
str = OpenSSL::ASN1::PrintableString.new('abc')
set = OpenSSL::ASN1::Set.new( [ int, str ] )
No documentation available
No documentation available
No documentation available
Search took: 5ms  ·  Total Results: 4175