Converts the contents of the database to an array of [key, value] arrays, and returns it.
Returns digest_obj.hexdigest().
Similar to Object#to_enum
, except it returns a lazy enumerator. This makes it easy to define Enumerable
methods that will naturally remain lazy if called from a lazy enumerator.
For example, continuing from the example in Object#to_enum
:
# See Object#to_enum for the definition of repeat r = 1..Float::INFINITY r.repeat(2).first(5) # => [1, 1, 2, 2, 3] r.repeat(2).class # => Enumerator r.repeat(2).map{|n| n ** 2}.first(5) # => endless loop! # works naturally on lazy enumerator: r.lazy.repeat(2).class # => Enumerator::Lazy r.lazy.repeat(2).map{|n| n ** 2}.first(5) # => [1, 1, 4, 4, 9]
Same as IO
.
Returns serialized iseq binary format data as a String
object. A corresponding iseq object is created by RubyVM::InstructionSequence.load_from_binary()
method.
String
extra_data will be saved with binary data. You can access this data with RubyVM::InstructionSequence.load_from_binary_extra_data(binary)
.
Note that the translated binary data is not portable. You can not move this binary data to another machine. You can not use the binary data which is created by another version/another architecture of Ruby
.
Occasionally it’s helpful to treat a string as if it were interpolated so that there’s a consistent interface for working with strings.
Occasionally it’s helpful to treat a string as if it were interpolated so that there’s a consistent interface for working with strings.
Turns this IPv4
address into a Resolv::DNS::Name
.
Turns this IPv6
address into a Resolv::DNS::Name
.
Full path of the target library file. If the file is not in this gem, return nil.
Return a Gem::Specification
from this gem