Results for: "match"

Serialization support for the object returned by _getobj_.

Reinitializes delegation from a serialized object.

Creates a new compiler for ERB. See ERB::Compiler.new for details

No documentation available

Returns true if the ipaddr is an IPv4-mapped IPv6 address.

Returns true if the ipaddr is an IPv4-compatible IPv6 address.

No documentation available

Returns a new ipaddr built by converting the native IPv4 address into an IPv4-mapped IPv6 address.

Returns a new ipaddr built by converting the native IPv4 address into an IPv4-compatible IPv6 address.

No documentation available

Returns the Ruby source filename and line number of the binding object.

No documentation available
No documentation available

Load the given PStore file. If read_only is true, the unmarshalled Hash will be returned. If read_only is false, a 3-tuple will be returned: the unmarshalled Hash, a checksum of the data, and the size of the data.

No documentation available

Iterates over all IP addresses for name.

Iterates over all hostnames for address.

Iterates over all IP addresses for name.

Iterates over all hostnames for address.

Returns the Ruby source filename and line number containing this proc or nil if this proc was not defined in Ruby (i.e. native).

Returns the Ruby source filename and line number containing this method or nil if this method was not defined in Ruby (i.e. native).

Returns the Ruby source filename and line number containing this method or nil if this method was not defined in Ruby (i.e. native).

Make obj shareable between ractors.

obj and all the objects it refers to will be frozen, unless they are already shareable.

If copy keyword is true, the method will copy objects before freezing them This is safer option but it can take be slower.

Note that the specification and implementation of this method are not mature and may be changed in the future.

obj = ['test']
Ractor.shareable?(obj)     #=> false
Ractor.make_shareable(obj) #=> ["test"]
Ractor.shareable?(obj)     #=> true
obj.frozen?                #=> true
obj[0].frozen?             #=> true

# Copy vs non-copy versions:
obj1 = ['test']
obj1s = Ractor.make_shareable(obj1)
obj1.frozen?                        #=> true
obj1s.object_id == obj1.object_id   #=> true
obj2 = ['test']
obj2s = Ractor.make_shareable(obj2, copy: true)
obj2.frozen?                        #=> false
obj2s.frozen?                       #=> true
obj2s.object_id == obj2.object_id   #=> false
obj2s[0].object_id == obj2[0].object_id #=> false

See also the “Shareable and unshareable objects” section in the Ractor class docs.

Returns the execution stack for the target thread—an array containing backtrace location objects.

See Thread::Backtrace::Location for more information.

This method behaves similarly to Kernel#caller_locations except it applies to a specific thread.

Converts block to a Proc object (and therefore binds it at the point of call) and registers it for execution when the program exits. If multiple handlers are registered, they are executed in reverse order of registration.

def do_at_exit(str1)
  at_exit { print str1 }
end
at_exit { puts "cruel world" }
do_at_exit("goodbye ")
exit

produces:

goodbye cruel world
Search took: 3ms  ·  Total Results: 1861