Returns true
if this is a null pointer.
Returns the remaining data held in the cipher object. Further calls to Cipher#update
or Cipher#final
will return garbage. This call should always be made as the last call of an encryption or decryption operation, after after having fed the entire plaintext or ciphertext to the Cipher
instance.
If an authenticated cipher was used, a CipherError
is raised if the tag could not be authenticated successfully. Only call this method after setting the authentication tag and passing the entire contents of the ciphertext into the cipher.
Emit a scalar with value
Called when an alias is found to anchor
. anchor
will be the name of the anchor found.
Here we have an example of an array that references itself in YAML:
--- &ponies - first element - *ponies
&ponies is the achor, *ponies is the alias. In this case, alias is called with “ponies”.
Called when a scalar value
is found. The scalar may have an anchor
, a tag
, be implicitly plain
or implicitly quoted
value
is the string value of the scalar anchor
is an associated anchor or nil tag
is an associated tag or nil plain
is a boolean value quoted
is a boolean value style
is an integer idicating the string style
See the constants in Psych::Nodes::Scalar
for the possible values of style
Here is a YAML document that exercises most of the possible ways this method can be called:
--- - !str "foo" - &anchor fun - many lines - | many newlines
The above YAML document contains a list with four strings. Here are the parameters sent to this method in the same order:
# value anchor tag plain quoted style ["foo", nil, "!str", false, false, 3 ] ["fun", "anchor", nil, true, false, 1 ] ["many lines", nil, nil, true, false, 1 ] ["many\nnewlines\n", nil, nil, false, true, 4 ]
Returns the exit status of the child for which PTY#check raised this exception
returns the socket family as an integer.
p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").family #=> 10
returns the cmsg data as a string.
p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").data #=> ""
returns the timestamp as a time object.
ancillarydata should be one of following type:
SOL_SOCKET/SCM_TIMESTAMP (microsecond) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X
SOL_SOCKET/SCM_TIMESTAMPNS (nanosecond) GNU/Linux
SOL_SOCKET/SCM_BINTIME (2**(-64) second) FreeBSD
Addrinfo.udp
(“127.0.0.1”, 0).bind {|s1|
Addrinfo.udp("127.0.0.1", 0).bind {|s2| s1.setsockopt(:SOCKET, :TIMESTAMP, true) s2.send "a", 0, s1.local_address ctl = s1.recvmsg.last p ctl #=> #<Socket::AncillaryData: INET SOCKET TIMESTAMP 2009-02-24 17:35:46.775581> t = ctl.timestamp p t #=> 2009-02-24 17:35:46 +0900 p t.usec #=> 775581 p t.nsec #=> 775581000 }
}
Returns the destination address of ifaddr. nil is returned if the flags doesn’t have IFF_POINTOPOINT.
Sends the String msg
to the source
returns the socket family as an integer.
p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).family #=> 10
returns the socket option data as a string.
p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).data #=> "\x01\x00\x00\x00"
Total number of input bytes read so far.
Total number of output bytes output so far.
Reads at most maxlen bytes from the gziped stream but it blocks only if gzipreader has no data immediately available. If the optional outbuf argument is present, it must reference a String, which will receive the data. It raises EOFError
on end of file.
Returns true
if stat is writable by the effective user id of this process.
File.stat("testfile").writable? #=> true
Returns true
if stat is executable or if the operating system doesn’t distinguish executable files from nonexecutable files. The tests are made using the effective owner of the process.
File.stat("testfile").executable? #=> false