Create a new PinnedExpressionNode
node
Create a new UntilNode
node
Initializes the MonitorMixin
after being included in a class or when an object has been extended with the MonitorMixin
Returns the convertible integer type of the given type
. You may optionally specify additional headers
to search in for the type
. convertible means actually the same type, or typedef’d from the same type.
If the type
is an integer type and the convertible type is found, the following macros are passed as preprocessor constants to the compiler using the type
name, in uppercase.
TYPEOF_
, followed by the type
name, followed by =X
where “X” is the found convertible type name.
TYP2NUM
and NUM2TYP
, where TYP
is the type
name in uppercase with replacing an _t
suffix with “T”, followed by =X
where “X” is the macro name to convert type
to an Integer
object, and vice versa.
For example, if foobar_t
is defined as unsigned long, then convertible_int("foobar_t")
would return “unsigned long”, and define these macros:
#define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
in foo | bar
Initialize WIN32OLE
object(ActiveX Control) by calling IPersistMemory::InitNew.
Before calling OLE method, some kind of the ActiveX controls created with MFC should be initialized by calling IPersistXXX::InitNew.
If and only if you received the exception “HRESULT error code: 0x8000ffff catastrophic failure”, try this method before invoking any ole_method.
obj = WIN32OLE.new("ProgID_or_GUID_of_ActiveX_Control") obj.ole_activex_initialize obj.method(...)
Yields each frame of the current execution stack as a backtrace location object.
Returns the method identifier for the given object
.
class A include ObjectSpace def foo trace_object_allocations do obj = Object.new p "#{allocation_class_path(obj)}##{allocation_method_id(obj)}" end end end A.new.foo #=> "Class#new"
See ::trace_object_allocations
for more information and examples.
The file name and line number of the caller of the caller of this method.
depth
is how many layers up the call stack it should go.
e.g.,
def a; Gem.location_of_caller
; end a #=> [“x.rb”, 2] # (it’ll vary depending on file name and line number)
def b; c; end def c; Gem.location_of_caller(2)
; end b #=> [“x.rb”, 6] # (it’ll vary depending on file name and line number)
Path to specification files of default gems.
Returns a new lazy enumerator with the concatenated results of running block
once for every element in the lazy enumerator.
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force #=> ["f", "o", "o", "b", "a", "r"]
A value x
returned by block
is decomposed if either of the following conditions is true:
x
responds to both each and force, which means that x
is a lazy enumerator.
x
is an array or responds to to_ary.
Otherwise, x
is contained as-is in the return value.
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force #=> [{:a=>1}, {:b=>2}]
Returns a hash of default options used by the Ruby iseq compiler.
For details, see InstructionSequence.compile_option=
.
Sets the default values for various optimizations in the Ruby iseq compiler.
Possible values for options
include true
, which enables all options, false
which disables all options, and nil
which leaves all options unchanged.
You can also pass a Hash
of options
that you want to change, any options not present in the hash will be left unchanged.
Possible option names (which are keys in options
) which can be set to true
or false
include:
:inline_const_cache
:instructions_unification
:operands_unification
:peephole_optimization
:specialized_instruction
:tailcall_optimization
Additionally, :debug_level
can be set to an integer.
These default options can be overwritten for a single run of the iseq compiler by passing any of the above values as the options
parameter to ::new
, ::compile
and ::compile_file
.
Remove previously defined command-line argument name
.
Handle the given list of arguments by parsing them and recording the results.
Create a new InstanceVariableAndWriteNode
node
Create a new InstanceVariableOrWriteNode
node
Create a new InstanceVariableReadNode
node