Results for: "partition"

Returns new ancillary data for IPV6_PKTINFO.

IPV6_PKTINFO is defined by RFC 3542.

addr = Addrinfo.ip("::1")
ifindex = 0
p Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
#=> #<Socket::AncillaryData: INET6 IPV6 PKTINFO ::1 ifindex:0>

Extracts addr and ifindex from IPV6_PKTINFO ancillary data.

IPV6_PKTINFO is defined by RFC 3542.

addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo #=> [#<Addrinfo: ::1>, 0]

Replace %w+% into the environment value of what is contained between the %‘s This method is used for REG_EXPAND_SZ.

For detail, see expandEnvironmentStrings Win32 API.

Returns the size of arguments of the method.

tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
method = WIN32OLE::Method.new(tobj, 'SaveAs')
puts method.size_params # => 11

Returns major version.

tobj = WIN32OLE::Type.new('Microsoft Word 10.0 Object Library', 'Documents')
puts tobj.major_version # => 8

Returns minor version.

tobj = WIN32OLE::Type.new('Microsoft Word 10.0 Object Library', 'Documents')
puts tobj.minor_version # => 2

Returns the type library major version.

tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
puts tlib.major_version # -> 1

Returns the type library minor version.

tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
puts tlib.minor_version # -> 3

Takes source, which can be a string of Ruby code, or an open File object. that contains Ruby source code. It parses and compiles using parse.y.

Optionally takes file, path, and line which describe the file path, real path and first line number of the ruby code in source which are metadata attached to the returned iseq.

file is used for ‘__FILE__` and exception backtrace. path is used for require_relative base. It is recommended these should be the same full path.

options, which can be true, false or a Hash, is used to modify the default behavior of the Ruby iseq compiler.

For details regarding valid compile options see ::compile_option=.

RubyVM::InstructionSequence.compile_parsey("a = 1 + 2")
#=> <RubyVM::InstructionSequence:<compiled>@<compiled>>

path = "test.rb"
RubyVM::InstructionSequence.compile_parsey(File.read(path), path, File.expand_path(path))
#=> <RubyVM::InstructionSequence:<compiled>@test.rb:1>

file = File.open("test.rb")
RubyVM::InstructionSequence.compile_parsey(file)
#=> <RubyVM::InstructionSequence:<compiled>@<compiled>:1>

path = File.expand_path("test.rb")
RubyVM::InstructionSequence.compile_parsey(File.read(path), path, path)
#=> <RubyVM::InstructionSequence:<compiled>@/absolute/path/to/test.rb:1>
No documentation available
No documentation available

Returns true; retained for compatibility.

Sets the read timeout, in seconds, for self to integer sec; the initial value is 60.

Argument sec must be a non-negative numeric value:

http = Net::HTTP.new(hostname)
http.read_timeout # => 60
http.get('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
http.read_timeout = 0
http.get('/todos/1') # Raises Net::ReadTimeout.
No documentation available
No documentation available
No documentation available

Returns true; retained for compatibility.

Sets the read timeout, in seconds, for self to integer sec; the initial value is 60.

Argument sec must be a non-negative numeric value:

http = Net::HTTP.new(hostname)
http.read_timeout # => 60
http.get('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
http.read_timeout = 0
http.get('/todos/1') # Raises Net::ReadTimeout.
No documentation available
No documentation available
No documentation available

Dispatches a single event for ‘node` to all registered listeners.

def dispatch_once: (Node) -> void

Delegates to the start_line of the associated location object.

The start offset of the node in the source. This method is effectively a delegate method to the location object.

Delegates to the start_column of the associated location object.

Search took: 4ms  ·  Total Results: 4702