Results for: "module_function"

Deletes the entry for the given key and returns its associated value.

If no block is given and key is found, deletes the entry and returns the associated value:

m = ObjectSpace::WeakKeyMap.new
key = "foo" # to hold reference to the key
m[key] = 1
m.delete("foo") # => 1
m["foo"] # => nil

If no block given and key is not found, returns nil.

If a block is given and key is found, ignores the block, deletes the entry, and returns the associated value:

m = ObjectSpace::WeakKeyMap.new
key = "foo" # to hold reference to the key
m[key] = 2
m.delete("foo") { |key| raise 'Will never happen'} # => 2

If a block is given and key is not found, yields the key to the block and returns the block’s return value:

m = ObjectSpace::WeakKeyMap.new
m.delete("nosuch") { |key| "Key #{key} not found" } # => "Key nosuch not found"

Removes all map entries; returns self.

Escape only the tags of certain HTML elements in string.

Takes an element or elements or array of elements. Each element is specified by the name of the element, without angle brackets. This matches both the start and the end tag of that element. The attribute list of the open tag will also be escaped (for instance, the double-quotes surrounding attribute values).

print CGI.escapeElement('<BR><A HREF="url"></A>', "A", "IMG")
  # "<BR>&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt"

print CGI.escapeElement('<BR><A HREF="url"></A>', ["A", "IMG"])
  # "<BR>&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt"

Returns digest_obj.digest_length().

Updates the digest with the contents of a given file name and returns self.

Decodes a BER- or DER-encoded value and creates an ASN1Data instance. der may be a String or any object that features a .to_der method transforming it into a BER-/DER-encoded String+

Example

der = File.binread('asn1data')
asn1 = OpenSSL::ASN1.decode(der)
No documentation available

Removes the header for the given case-insensitive key (see Fields); returns the deleted value, or nil if no such field exists:

req = Net::HTTP::Get.new(uri)
req.delete('Accept') # => ["*/*"]
req.delete('Nosuch') # => nil

Create a new repository for the given filepath.

Is remote fetching enabled?

No documentation available

Check if gem name version version is installed.

Displays an alert statement. Asks a question if given.

No documentation available

Raises a TypeError to prevent duping.

By default, do not retain any state when marshalling.

Check if YJIT is enabled.

Enable YJIT compilation. stats option decides whether to enable YJIT stats or not. log decides whether to enable YJIT compilation logging or not. Optional mem_size and call_threshold can be provided to override default configuration.

Returns the current session cache size. Zero is used to represent an unlimited cache size.

Sets the session cache size. Returns the previously valid session cache size. Zero is used to represent an unlimited session cache size.

Returns a Hash containing the following keys:

:accept

Number of started SSL/TLS handshakes in server mode

:accept_good

Number of established SSL/TLS sessions in server mode

:accept_renegotiate

Number of start renegotiations in server mode

:cache_full

Number of sessions that were removed due to cache overflow

:cache_hits

Number of successfully reused connections

:cache_misses

Number of sessions proposed by clients that were not found in the cache

:cache_num

Number of sessions in the internal session cache

:cb_hits

Number of sessions retrieved from the external cache in server mode

:connect

Number of started SSL/TLS handshakes in client mode

:connect_good

Number of established SSL/TLS sessions in client mode

:connect_renegotiate

Number of start renegotiations in client mode

:timeouts

Number of sessions proposed by clients that were found in the cache but had expired due to timeouts

No documentation available
No documentation available
No documentation available

Oldest version we support downgrading to. This is the version that originally ships with the oldest supported patch version of ruby.

Search took: 5ms  ·  Total Results: 3310