jruby/docs BETA
Navigation
org.jruby.runtime 44
I Accessor
C ArgumentDescriptor
E ArgumentType
C Arity
C Binding
C Block
C BlockBody
I BlockCallback
C Builtins
C CallBlock
C CallBlock19
C CallSite
E CallType
E ClassIndex
C CompiledIRBlockBody
C Constants
C ContextAwareBlockBody
C DynamicScope
C EventHook
I ExecutionContext
C Frame
C GlobalVariable
C Helpers
I IAccessor
C IRBlockBody
C InterpretedIRBlockBody
C JavaInternalBlockBody
C JavaSites
C MethodBlockBody
C MethodFactory
C MethodIndex
C MixedModeIRBlockBody
C NullBlockBody
I ObjectAllocator
I ObjectMarshal
C ObjectSpace
I PositionAware
C ReadonlyGlobalVariable
E RubyEvent
C Signature
I SimpleHash
C ThreadContext
C TraceEventManager
E Visibility
ThreadContext — members 174
F runtime() Ruby
F nil() IRubyObject
F tru() RubyBoolean
F fals() RubyBoolean
F runtimeCache() RuntimeCache
F builtinBits() int[]
F traceEvents() TraceEventManager
F CALL_SPLATS() int
F CALL_KEYWORD() int
F CALL_KEYWORD_REST() int
F CALL_KEYWORD_EMPTY() int
F callInfo() int
F sites() JavaSites
F callNumber() int
F WALKER() StackWalker
F WALKER8() StackWalker
F exceptionRequiresBacktrace() boolean
M add_thread_trace_function(trace_func, use_context_hook) IRubyObject
M back_ref() IRubyObject
M back_ref=(match) IRubyObject
M backtrace() BacktraceElement>
C blocking_thread_poll()
C call_thread_poll()
C call_thread_poll(context)
M callee_name() String
M clear_back_ref() IRubyObject
C clear_call_info()
C clear_call_info(context)
C clear_error_info()
C clear_local_match()
M clear_thread_trace_functions() IRubyObject
M composite_name() String
M create_caller_backtrace(level, length, stack_stream) IRubyObject
M create_caller_locations(level, length, stack_stream) IRubyObject
M create_raw_backtrace_string_from_throwable(ex, color) String
M current_binding() Binding
M current_binding(self) Binding
M current_binding(self, visibility) Binding
M current_binding(self, scope) Binding
M current_binding(self, visibility, scope) Binding
M current_frame() Frame
M current_scope() DynamicScope
M current_static_scope() StaticScope
M current_target() int
M current_visibility() Visibility
C current_visibility=(visibility)
C each_caller_location(stack_stream, consumer)
M encoding_holder() Encoding[]
M error_info() IRubyObject
M error_info=(error_info) IRubyObject
C event_hooks_enabled=(flag)
M event_hooks_enabled?() boolean
C exception_backtrace_off()
C exception_backtrace_on()
C exception_requires_backtrace=(exception_requires_backtrace)
M exec_recursive(func, state, obj, name) IRubyObject
M fiber() ThreadFiber
C fiber=(fiber)
M fiber_current_thread() RubyThread
M file() String
M file_and_line() String
M frame_block() Block
M frame_klazz() RubyModule
M frame_name() String
M frame_self() IRubyObject
M get_active_catch(tag) CatchThrow
M get_backtrace(level) BacktraceElement>
M get_single_backtrace(level) RubyStackTraceElement
M get_single_backtrace_exact(level) RubyStackTraceElement
M has_any_scopes?() boolean
M has_keywords(call_info) boolean
M has_nonempty_keywords(call_info) boolean
M keywords_empty(call_info) boolean
M last_call_type() CallType
M last_exit_status() IRubyObject
C last_exit_status=(last_exit_status)
M last_line() IRubyObject
M last_line=(last) IRubyObject
M last_match() IRubyObject
M last_visibility() Visibility
M line() int
C line=(line)
M local_match() RubyMatchData
C local_match=(local_match)
M local_match_or_nil() IRubyObject
M match_last() IRubyObject
M match_post() IRubyObject
M match_pre() IRubyObject
M new_context(runtime) ThreadContext
M next_frame() Frame
C poll_thread_events()
C pop_backtrace(context)
C pop_catch()
C pop_frame()
C pop_scope()
C post_backref_method()
C post_eval_scriptlet()
C post_eval_with_binding(binding, last_frame)
C post_execute_under()
C post_method_backtrace_and_scope()
C post_method_backtrace_dummy_scope()
C post_method_backtrace_only()
C post_method_frame_and_scope()
C post_method_frame_only()
C post_method_scope_only()
C post_node_eval()
C post_scoped_body()
C post_trace()
C post_yield(binding, last_frame)
C post_yield_no_scope(last_frame)
C pre_adopt_thread()
C pre_backref_method()
C pre_eval_scriptlet(scope)
M pre_eval_with_binding(binding) Frame
C pre_execute_under(execute_under_obj, execute_under_class, block)
C pre_extension_load(self)
C pre_method_backtrace_and_scope(name, static_scope)
C pre_method_backtrace_dummy_scope(name, static_scope)
C pre_method_backtrace_only(name)
C pre_method_frame_and_dummy_scope(clazz, name, self, block, static_scope)
C pre_method_frame_and_scope(clazz, name, self, block, static_scope)
C pre_method_frame_only(clazz, name, self, block)
C pre_method_frame_only(clazz, name, self, visiblity, block)
C pre_method_frame_only(clazz, name, self)
C pre_method_no_frame_and_dummy_scope(static_scope)
C pre_method_scope_only(static_scope)
C pre_node_eval(self)
C pre_scoped_body(scope)
C pre_trace()
M pre_yield_no_scope(binding) Frame
M pre_yield_no_scope(block) Frame
M pre_yield_specific_block(binding, scope) Frame
C prepare_top_level(object_class, top_self)
M previous_frame() Frame
C print_scope()
M private_constant_reference() RubyModule
C private_constant_reference=(private_constant_reference)
M profile_collection() ProfileCollection
M profile_enter(next_method) int
M profile_enter(name, next_method) int
M profile_exit(next_method, start_time) int
M profiling?() boolean
C push_backtrace(context, method, file, line)
C push_catch(catch_target)
C push_eval_simple_frame(execute_object)
C push_frame()
M push_new_scope(static_scope) DynamicScope
C push_scope(scope)
M recursive_set() Pair>
C recursive_set=(recursive_set)
C render_current_backtrace(sb)
M reset_call_info() int
M reset_call_info(context) int
C root_fiber=(root_fiber)
M ruby_date_formatter() RubyDateFormatter
M runtime() Ruby
M safe_recurse(func, state, obj, name, outer) IRubyObject
M saved_exception_in_lambda() Throwable
C saved_exception_in_lambda=(e)
M scope_exists_on_call_stack(scope) boolean
C set_file_and_line(file, line)
C set_last_call_status_and_visibility(call_type, visibility)
M single_backtrace() RubyStackTraceElement
C start_profiling()
C stop_profiling()
M thread() RubyThread
C thread=(thread)
M thread_trace_function=(trace_func) IRubyObject
C trace(event, name, impl_class)
C trace(event, name, impl_class, file, line)
M update_backref() IRubyObject
C use_recursion_guards_from(context)
C within_trace=(is_within_trace)
M within_trace?() boolean

org.jruby.runtime.ThreadContext

class final 174 members

Constants

constanttypenote
CALL_SPLATS int
CALL_KEYWORD int
CALL_KEYWORD_REST int
CALL_KEYWORD_EMPTY int
WALKER StackWalker
WALKER8 StackWalker

Fields

fieldtypenote
runtime Ruby
nil IRubyObject
tru RubyBoolean
fals RubyBoolean
runtimeCache RuntimeCache
builtinBits int[] Thread-local reference to runtime's builtin bits. Public final for direct field access (fastest possible). Usage: Builtins.checkIntegerPlus(context) reads context.builtinBits[0]
traceEvents TraceEventManager
callInfo int
sites JavaSites
callNumber int
exceptionRequiresBacktrace boolean

Class Methods

call_thread_poll

call_thread_poll ( ThreadContext context )
Java: callThreadPoll(org.jruby.runtime.ThreadContext context)

clear_call_info

clear_call_info ( ThreadContext context )
Java: clearCallInfo(org.jruby.runtime.ThreadContext context)

Clear call info state (set to 0). This method is static to make it trivially inlinable on most JVM JITs

create_raw_backtrace_string_from_throwable

String create_raw_backtrace_string_from_throwable ( Throwable ex, boolean color )
Java: createRawBacktraceStringFromThrowable(Throwable ex, boolean color)

has_keywords

boolean has_keywords ( int call_info )
Java: hasKeywords(int callInfo)

has_nonempty_keywords

boolean has_nonempty_keywords ( int call_info )
Java: hasNonemptyKeywords(int callInfo)

keywords_empty

boolean keywords_empty ( int call_info )
Java: keywordsEmpty(int callInfo)

new_context

ThreadContext new_context ( Ruby runtime )
Java: newContext(org.jruby.Ruby runtime)

pop_backtrace

pop_backtrace ( ThreadContext context )
Java: popBacktrace(org.jruby.runtime.ThreadContext context)

push_backtrace

push_backtrace ( ThreadContext context, String method, String file, int line )
Java: pushBacktrace(org.jruby.runtime.ThreadContext context, String method, String file, int line)

reset_call_info

int reset_call_info ( ThreadContext context )
Java: resetCallInfo(org.jruby.runtime.ThreadContext context)

Reset call info state and return the value of call info right before it is reset. This method is static to make it trivially inlinable on most JVM JITs

Returns: the old call info

Instance Methods

add_thread_trace_function

IRubyObject add_thread_trace_function ( IRubyObject trace_func, boolean use_context_hook )
Java: addThreadTraceFunction(org.jruby.runtime.builtin.IRubyObject trace_func, boolean useContextHook)

back_ref

IRubyObject back_ref ( )
Java: getBackRef() · also: get_back_ref

Get the value of the $~ (backref) "global".

Returns: the value of $~

back_ref=

IRubyObject back_ref= ( RubyMatchData match )
Java: setBackRef(org.jruby.RubyMatchData match) · also: set_back_ref

Set the $~ (backref) "global" to the given RubyMatchData value. The value will be marked as "in use" since it can now be seen across threads that share the current frame.

nametypedescription
matchorg.jruby.RubyMatchDatathe value to set

Returns: the value passed in

backtrace

Stream<BacktraceElement> backtrace ( )
Java: getBacktrace() · also: get_backtrace

Create a snapshot Array with current backtrace information.

Returns: the backtrace

blocking_thread_poll

blocking_thread_poll ( )
Java: blockingThreadPoll()

Poll for thread events that should be fired before a blocking call. See vm_check_ints_blocking and RUBY_VM_CHECK_INTS_BLOCKING in CRuby.

call_thread_poll

call_thread_poll ( )
Java: callThreadPoll()

callee_name

String callee_name ( )
Java: getCalleeName() · also: get_callee_name

The name under which the current method was called, if called via an alias. Used for __callee__.

Returns: the name under which the current method was called

clear_back_ref

IRubyObject clear_back_ref ( )
Java: clearBackRef()

Set the $~ (backref) "global" to nil.

Returns: nil

clear_call_info

clear_call_info ( )
Java: clearCallInfo()
Deprecated. use the trivially-inlinable static version

Clear call info state (set to 0).

clear_error_info

clear_error_info ( )
Java: clearErrorInfo()

clear_local_match

clear_local_match ( )
Java: clearLocalMatch()

Set the thread-local MatchData specific to this context to null.

clear_thread_trace_functions

IRubyObject clear_thread_trace_functions ( )
Java: clearThreadTraceFunctions()

composite_name

String composite_name ( )
Java: getCompositeName() · also: get_composite_name

A string representing the name of the current method and the name under which it was called. If not called via an alias, this will be a single string. If called via an alias, it will be encoded as "\0alias\0original" and must be unpacked for its components.

Returns: a representation of the current method's name and the name it was called under

create_caller_backtrace

IRubyObject create_caller_backtrace ( int level, int length, Stream<StackWalker.StackFrame> stack_stream )
Java: createCallerBacktrace(int level, int length, java.util.stream.Stream<com.headius.backport9.stack.StackWalker.StackFrame> stackStream)

Create an Array with backtrace information for Kernel#caller

Returns: an Array with the backtrace

create_caller_locations

IRubyObject create_caller_locations ( int level, int length, Stream<StackWalker.StackFrame> stack_stream )
Java: createCallerLocations(int level, int length, java.util.stream.Stream<com.headius.backport9.stack.StackWalker.StackFrame> stackStream)

Create an array containing Thread::Backtrace::Location objects for the requested caller trace level and length.

nametypedescription
levelintthe level at which the trace should start
lengthintthe length of the trace

Returns: an Array with the backtrace locations

current_binding

Binding current_binding ( )
Java: currentBinding()

Return a binding representing the current call's state

Returns: the current binding

current_binding

Binding current_binding ( IRubyObject self )
Java: currentBinding(org.jruby.runtime.builtin.IRubyObject self)

Return a binding representing the current call's state but with a specified self

nametypedescription
selforg.jruby.runtime.builtin.IRubyObjectthe self object to use

Returns: the current binding, using the specified self

current_binding

Binding current_binding ( IRubyObject self, Visibility visibility )
Java: currentBinding(org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.Visibility visibility)

Return a binding representing the current call's state but with the specified visibility and self.

nametypedescription
selforg.jruby.runtime.builtin.IRubyObjectthe self object to use
visibilityorg.jruby.runtime.Visibilitythe visibility to use

Returns: the current binding using the specified self and visibility

current_binding

Binding current_binding ( IRubyObject self, DynamicScope scope )
Java: currentBinding(org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.DynamicScope scope)

Return a binding representing the current call's state but with the specified scope and self.

nametypedescription
selforg.jruby.runtime.builtin.IRubyObjectthe self object to use
scopeorg.jruby.runtime.DynamicScopethe scope to use

Returns: the current binding using the specified self and scope

current_binding

Binding current_binding ( IRubyObject self, Visibility visibility, DynamicScope scope )
Java: currentBinding(org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.Visibility visibility, org.jruby.runtime.DynamicScope scope)

Return a binding representing the current call's state but with the specified visibility, scope, and self. For shared-scope binding consumers like for loops.

nametypedescription
selforg.jruby.runtime.builtin.IRubyObjectthe self object to use
visibilityorg.jruby.runtime.Visibilitythe visibility to use
scopeorg.jruby.runtime.DynamicScopethe scope to use

Returns: the current binding using the specified self, scope, and visibility

current_frame

Frame current_frame ( )
Java: getCurrentFrame() · also: get_current_frame

current_scope

DynamicScope current_scope ( )
Java: getCurrentScope() · also: get_current_scope

current_static_scope

StaticScope current_static_scope ( )
Java: getCurrentStaticScope() · also: get_current_static_scope

current_target

int current_target ( )
Java: getCurrentTarget() · also: get_current_target

current_visibility

Visibility current_visibility ( )
Java: getCurrentVisibility() · also: get_current_visibility

current_visibility=

current_visibility= ( Visibility visibility )
Java: setCurrentVisibility(org.jruby.runtime.Visibility visibility) · also: set_current_visibility

each_caller_location

each_caller_location ( Stream<StackWalker.StackFrame> stack_stream, Consumer<RubyThread.Location> consumer )
Java: eachCallerLocation(java.util.stream.Stream<com.headius.backport9.stack.StackWalker.StackFrame> stackStream, java.util.function.Consumer<org.jruby.RubyThread.Location> consumer)

Like #createCallerLocations(int, int, Stream) but accepts a lambda to yield each location and yields all stack elements until the loop ends or is broken early.

nametypedescription
stack_streamjava.util.stream.Stream<com.headius.backport9.stack.StackWalker.StackFrame>the stream of StackFrame objects from JVM
consumerjava.util.function.Consumer<org.jruby.RubyThread.Location>the consumer of RubyThread.Location objects

encoding_holder

Encoding[] encoding_holder ( )
Java: encodingHolder()

error_info

IRubyObject error_info ( )
Java: getErrorInfo() · also: get_error_info

error_info=

IRubyObject error_info= ( IRubyObject error_info )
Java: setErrorInfo(org.jruby.runtime.builtin.IRubyObject errorInfo) · also: set_error_info

event_hooks_enabled=

event_hooks_enabled= ( boolean flag )
Java: setEventHooksEnabled(boolean flag) · also: set_event_hooks_enabled

event_hooks_enabled?

boolean event_hooks_enabled? ( )
Java: isEventHooksEnabled() · also: is_event_hooks_enabled

exception_backtrace_off

exception_backtrace_off ( )
Java: exceptionBacktraceOff()

exception_backtrace_on

exception_backtrace_on ( )
Java: exceptionBacktraceOn()

exception_requires_backtrace=

exception_requires_backtrace= ( boolean exception_requires_backtrace )
Java: setExceptionRequiresBacktrace(boolean exceptionRequiresBacktrace) · also: set_exception_requires_backtrace

exec_recursive

IRubyObject exec_recursive ( ThreadContext.RecursiveFunctionEx<T> func, T state, IRubyObject obj, String name )
Java: execRecursive(org.jruby.runtime.ThreadContext.RecursiveFunctionEx<T> func, T state, org.jruby.runtime.builtin.IRubyObject obj, String name)

fiber

ThreadFiber fiber ( )
Java: getFiber() · also: get_fiber

fiber=

fiber= ( ThreadFiber fiber )
Java: setFiber(org.jruby.ext.fiber.ThreadFiber fiber) · also: set_fiber

fiber_current_thread

RubyThread fiber_current_thread ( )
Java: getFiberCurrentThread() · also: get_fiber_current_thread

file

String file ( )
Java: getFile() · also: get_file

file_and_line

String file_and_line ( )
Java: getFileAndLine() · also: get_file_and_line

frame_block

Block frame_block ( )
Java: getFrameBlock() · also: get_frame_block

frame_klazz

RubyModule frame_klazz ( )
Java: getFrameKlazz() · also: get_frame_klazz

frame_name

String frame_name ( )
Java: getFrameName() · also: get_frame_name

The currently-running method's original name, used for stack traces, super calls, and __method__, and trace hooks.

Returns: the current method's name

frame_self

IRubyObject frame_self ( )
Java: getFrameSelf() · also: get_frame_self

get_active_catch

CatchThrow get_active_catch ( Object tag )
Java: getActiveCatch(Object tag)

Find the active Continuation for the given tag. Must be called with an interned string.

nametypedescription
tagObjectThe interned string to search for

Returns: The continuation associated with this tag

get_backtrace

Stream<BacktraceElement> get_backtrace ( int level )
Java: getBacktrace(int level)

get_single_backtrace

RubyStackTraceElement get_single_backtrace ( int level )
Java: getSingleBacktrace(int level)

Return a single RubyStackTraceElement representing the nearest Ruby stack trace element. Used for warnings and Kernel#__dir__.

Returns: the nearest stack trace element

get_single_backtrace_exact

RubyStackTraceElement get_single_backtrace_exact ( int level )
Java: getSingleBacktraceExact(int level)

Return the trace of level or null.

has_any_scopes?

boolean has_any_scopes? ( )
Java: hasAnyScopes() · also: has_any_scopes

last_call_type

CallType last_call_type ( )
Java: getLastCallType() · also: get_last_call_type

last_exit_status

IRubyObject last_exit_status ( )
Java: getLastExitStatus() · also: get_last_exit_status

last_exit_status=

last_exit_status= ( IRubyObject last_exit_status )
Java: setLastExitStatus(org.jruby.runtime.builtin.IRubyObject lastExitStatus) · also: set_last_exit_status

last_line

IRubyObject last_line ( )
Java: getLastLine() · also: get_last_line

Get the value of the $_ (lastline) "global".

Returns: the value of $_

last_line=

IRubyObject last_line= ( IRubyObject last )
Java: setLastLine(org.jruby.runtime.builtin.IRubyObject last) · also: set_last_line

Set the $_ (lastlne) "global" to the given value.

nametypedescription
lastorg.jruby.runtime.builtin.IRubyObjectthe value to set

Returns: the value passed in

last_match

IRubyObject last_match ( )
Java: last_match()

MRI: rb_reg_last_match

last_visibility

Visibility last_visibility ( )
Java: getLastVisibility() · also: get_last_visibility

line

int line ( )
Java: getLine() · also: get_line

line=

line= ( int line )
Java: setLine(int line) · also: set_line

local_match

RubyMatchData local_match ( )
Java: getLocalMatch() · also: get_local_match

Get the thread-local MatchData specific to this context. This is different from the frame backref since frames may be shared by several executing contexts at once (see jruby/jruby#4868).

Returns: the current thread-local MatchData, or null if none

local_match=

local_match= ( RubyMatchData local_match )
Java: setLocalMatch(org.jruby.RubyMatchData localMatch) · also: set_local_match

Set the thread-local MatchData specific to this context. This is different from the frame backref since frames may be shared by several executing contexts at once (see jruby/jruby#4868).

nametypedescription
local_matchorg.jruby.RubyMatchDatathe new thread-local MatchData or null

local_match_or_nil

IRubyObject local_match_or_nil ( )
Java: getLocalMatchOrNil() · also: get_local_match_or_nil

Get the thread-local MatchData specific to this context or nil if none.

Returns: the current thread-local MatchData, or nil if none

match_last

IRubyObject match_last ( )
Java: match_last()

MRI: rb_reg_match_last

match_post

IRubyObject match_post ( )
Java: match_post()

MRI: rb_reg_match_post

match_pre

IRubyObject match_pre ( )
Java: match_pre()

MRI: rb_reg_match_pre

next_frame

Frame next_frame ( )
Java: getNextFrame() · also: get_next_frame

poll_thread_events

poll_thread_events ( )
Java: pollThreadEvents()

pop_catch

pop_catch ( )
Java: popCatch()

pop_frame

pop_frame ( )
Java: popFrame()

pop_scope

pop_scope ( )
Java: popScope()

post_backref_method

post_backref_method ( )
Java: postBackrefMethod()

post_eval_scriptlet

post_eval_scriptlet ( )
Java: postEvalScriptlet()

post_eval_with_binding

post_eval_with_binding ( Binding binding, Frame last_frame )
Java: postEvalWithBinding(org.jruby.runtime.Binding binding, org.jruby.runtime.Frame lastFrame)

post_execute_under

post_execute_under ( )
Java: postExecuteUnder()

post_method_backtrace_and_scope

post_method_backtrace_and_scope ( )
Java: postMethodBacktraceAndScope()

post_method_backtrace_dummy_scope

post_method_backtrace_dummy_scope ( )
Java: postMethodBacktraceDummyScope()

post_method_backtrace_only

post_method_backtrace_only ( )
Java: postMethodBacktraceOnly()

post_method_frame_and_scope

post_method_frame_and_scope ( )
Java: postMethodFrameAndScope()

post_method_frame_only

post_method_frame_only ( )
Java: postMethodFrameOnly()

post_method_scope_only

post_method_scope_only ( )
Java: postMethodScopeOnly()

post_node_eval

post_node_eval ( )
Java: postNodeEval()

post_scoped_body

post_scoped_body ( )
Java: postScopedBody()

post_trace

post_trace ( )
Java: postTrace()

post_yield

post_yield ( Binding binding, Frame last_frame )
Java: postYield(org.jruby.runtime.Binding binding, org.jruby.runtime.Frame lastFrame)

post_yield_no_scope

post_yield_no_scope ( Frame last_frame )
Java: postYieldNoScope(org.jruby.runtime.Frame lastFrame)

pre_adopt_thread

pre_adopt_thread ( )
Java: preAdoptThread()

pre_backref_method

pre_backref_method ( )
Java: preBackrefMethod()

pre_eval_scriptlet

pre_eval_scriptlet ( DynamicScope scope )
Java: preEvalScriptlet(org.jruby.runtime.DynamicScope scope)

pre_eval_with_binding

Frame pre_eval_with_binding ( Binding binding )
Java: preEvalWithBinding(org.jruby.runtime.Binding binding)

pre_execute_under

pre_execute_under ( IRubyObject execute_under_obj, RubyModule execute_under_class, Block block )
Java: preExecuteUnder(org.jruby.runtime.builtin.IRubyObject executeUnderObj, org.jruby.RubyModule executeUnderClass, org.jruby.runtime.Block block)

pre_extension_load

pre_extension_load ( IRubyObject self )
Java: preExtensionLoad(org.jruby.runtime.builtin.IRubyObject self)

pre_method_backtrace_and_scope

pre_method_backtrace_and_scope ( String name, StaticScope static_scope )
Java: preMethodBacktraceAndScope(String name, org.jruby.parser.StaticScope staticScope)

pre_method_backtrace_dummy_scope

pre_method_backtrace_dummy_scope ( String name, StaticScope static_scope )
Java: preMethodBacktraceDummyScope(String name, org.jruby.parser.StaticScope staticScope)

pre_method_backtrace_only

pre_method_backtrace_only ( String name )
Java: preMethodBacktraceOnly(String name)

pre_method_frame_and_dummy_scope

pre_method_frame_and_dummy_scope ( RubyModule clazz, String name, IRubyObject self, Block block, StaticScope static_scope )
Java: preMethodFrameAndDummyScope(org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.Block block, org.jruby.parser.StaticScope staticScope)

pre_method_frame_and_scope

pre_method_frame_and_scope ( RubyModule clazz, String name, IRubyObject self, Block block, StaticScope static_scope )
Java: preMethodFrameAndScope(org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.Block block, org.jruby.parser.StaticScope staticScope)

pre_method_frame_only

pre_method_frame_only ( RubyModule clazz, String name, IRubyObject self, Block block )
Java: preMethodFrameOnly(org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.Block block)

pre_method_frame_only

pre_method_frame_only ( RubyModule clazz, String name, IRubyObject self, Visibility visiblity, Block block )
Java: preMethodFrameOnly(org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.Visibility visiblity, org.jruby.runtime.Block block)

pre_method_frame_only

pre_method_frame_only ( RubyModule clazz, String name, IRubyObject self )
Java: preMethodFrameOnly(org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject self)

pre_method_no_frame_and_dummy_scope

pre_method_no_frame_and_dummy_scope ( StaticScope static_scope )
Java: preMethodNoFrameAndDummyScope(org.jruby.parser.StaticScope staticScope)

pre_method_scope_only

pre_method_scope_only ( StaticScope static_scope )
Java: preMethodScopeOnly(org.jruby.parser.StaticScope staticScope)

pre_node_eval

pre_node_eval ( IRubyObject self )
Java: preNodeEval(org.jruby.runtime.builtin.IRubyObject self)

pre_scoped_body

pre_scoped_body ( DynamicScope scope )
Java: preScopedBody(org.jruby.runtime.DynamicScope scope)

pre_trace

pre_trace ( )
Java: preTrace()

pre_yield_no_scope

Frame pre_yield_no_scope ( Binding binding )
Java: preYieldNoScope(org.jruby.runtime.Binding binding)

pre_yield_no_scope

Frame pre_yield_no_scope ( Block block )
Java: preYieldNoScope(org.jruby.runtime.Block block)

pre_yield_specific_block

Frame pre_yield_specific_block ( Binding binding, StaticScope scope )
Java: preYieldSpecificBlock(org.jruby.runtime.Binding binding, org.jruby.parser.StaticScope scope)

prepare_top_level

prepare_top_level ( RubyClass object_class, IRubyObject top_self )
Java: prepareTopLevel(org.jruby.RubyClass objectClass, org.jruby.runtime.builtin.IRubyObject topSelf)

previous_frame

Frame previous_frame ( )
Java: getPreviousFrame() · also: get_previous_frame

print_scope

print_scope ( )
Java: printScope()

private_constant_reference

RubyModule private_constant_reference ( )
Java: getPrivateConstantReference() · also: get_private_constant_reference

private_constant_reference=

private_constant_reference= ( RubyModule private_constant_reference )
Java: setPrivateConstantReference(org.jruby.RubyModule privateConstantReference) · also: set_private_constant_reference

profile_collection

ProfileCollection profile_collection ( )
Java: getProfileCollection() · also: get_profile_collection

Get the profile collection for this thread (ThreadContext).

Returns: the thread's profile collection

profile_enter

int profile_enter ( int next_method )
Java: profileEnter(int nextMethod)

profile_enter

int profile_enter ( String name, DynamicMethod next_method )
Java: profileEnter(String name, org.jruby.internal.runtime.methods.DynamicMethod nextMethod)

profile_exit

int profile_exit ( int next_method, long start_time )
Java: profileExit(int nextMethod, long startTime)

profiling?

boolean profiling? ( )
Java: isProfiling() · also: is_profiling

push_catch

push_catch ( CatchThrow catch_target )
Java: pushCatch(org.jruby.exceptions.CatchThrow catchTarget)

push_eval_simple_frame

push_eval_simple_frame ( IRubyObject execute_object )
Java: pushEvalSimpleFrame(org.jruby.runtime.builtin.IRubyObject executeObject)

push_frame

push_frame ( )
Java: pushFrame()

push_new_scope

DynamicScope push_new_scope ( StaticScope static_scope )
Java: pushNewScope(org.jruby.parser.StaticScope staticScope)

push_scope

push_scope ( DynamicScope scope )
Java: pushScope(org.jruby.runtime.DynamicScope scope)

recursive_set

Set<RecursiveComparator.Pair> recursive_set ( )
Java: getRecursiveSet() · also: get_recursive_set

recursive_set=

recursive_set= ( Set<RecursiveComparator.Pair> recursive_set )
Java: setRecursiveSet(Set<org.jruby.util.RecursiveComparator.Pair> recursiveSet) · also: set_recursive_set

render_current_backtrace

render_current_backtrace ( StringBuilder sb )
Java: renderCurrentBacktrace(StringBuilder sb)

Render the current backtrace as a string to the given StringBuilder. This will honor the currently-configured backtrace format and content.

nametypedescription
sbStringBuilderthe StringBuilder to which to render the backtrace

reset_call_info

int reset_call_info ( )
Java: resetCallInfo()
Deprecated. use the trivially-inlinable static version

Reset call info state and return the value of call info right before it is reset.

Returns: the old call info

root_fiber=

root_fiber= ( ThreadFiber root_fiber )
Java: setRootFiber(org.jruby.ext.fiber.ThreadFiber rootFiber) · also: set_root_fiber

ruby_date_formatter

RubyDateFormatter ruby_date_formatter ( )
Java: getRubyDateFormatter() · also: get_ruby_date_formatter

runtime

Ruby runtime ( )
Java: getRuntime() · also: get_runtime

Retrieve the runtime associated with this context. Note that there's no reason to call this method rather than accessing the runtime field directly.

Returns: the runtime associated with this context

safe_recurse

IRubyObject safe_recurse ( ThreadContext.RecursiveFunctionEx<T> func, T state, IRubyObject obj, String name, boolean outer )
Java: safeRecurse(org.jruby.runtime.ThreadContext.RecursiveFunctionEx<T> func, T state, org.jruby.runtime.builtin.IRubyObject obj, String name, boolean outer)

saved_exception_in_lambda

Throwable saved_exception_in_lambda ( )
Java: getSavedExceptionInLambda() · also: get_saved_exception_in_lambda

saved_exception_in_lambda=

saved_exception_in_lambda= ( Throwable e )
Java: setSavedExceptionInLambda(Throwable e) · also: set_saved_exception_in_lambda

scope_exists_on_call_stack

boolean scope_exists_on_call_stack ( DynamicScope scope )
Java: scopeExistsOnCallStack(org.jruby.runtime.DynamicScope scope)

Check if a scope is present on the call stack. This is the IR equivalent of isJumpTargetAlive

nametypedescription
scopeorg.jruby.runtime.DynamicScopethe scope to look for

Returns: true if it exists. otherwise false.

set_file_and_line

set_file_and_line ( String file, int line )
Java: setFileAndLine(String file, int line)

set_last_call_status_and_visibility

set_last_call_status_and_visibility ( CallType call_type, Visibility visibility )
Java: setLastCallStatusAndVisibility(org.jruby.runtime.CallType callType, org.jruby.runtime.Visibility visibility)

single_backtrace

RubyStackTraceElement single_backtrace ( )
Java: getSingleBacktrace() · also: get_single_backtrace

Same as calling getSingleBacktrace(0);

start_profiling

start_profiling ( )
Java: startProfiling()

stop_profiling

stop_profiling ( )
Java: stopProfiling()

thread

RubyThread thread ( )
Java: getThread() · also: get_thread

thread=

thread= ( RubyThread thread )
Java: setThread(org.jruby.RubyThread thread) · also: set_thread

thread_trace_function=

IRubyObject thread_trace_function= ( IRubyObject trace_func )
Java: setThreadTraceFunction(org.jruby.runtime.builtin.IRubyObject trace_func) · also: set_thread_trace_function

trace

trace ( RubyEvent event, String name, RubyModule impl_class )
Java: trace(org.jruby.runtime.RubyEvent event, String name, org.jruby.RubyModule implClass)

trace

trace ( RubyEvent event, String name, RubyModule impl_class, String file, int line )
Java: trace(org.jruby.runtime.RubyEvent event, String name, org.jruby.RubyModule implClass, String file, int line)

update_backref

IRubyObject update_backref ( )
Java: updateBackref()

Update the current frame's backref using the current thread-local match, or clear it if that match is null.

Returns: The current match, or nil

use_recursion_guards_from

use_recursion_guards_from ( ThreadContext context )
Java: useRecursionGuardsFrom(org.jruby.runtime.ThreadContext context)

Fibers must use the same recursion guards as their parent thread.

within_trace=

within_trace= ( boolean is_within_trace )
Java: setWithinTrace(boolean isWithinTrace) · also: set_within_trace

Set whether we are actively tracing or not on this thread.

nametypedescription
is_within_tracebooleantrue is so

within_trace?

boolean within_trace? ( )
Java: isWithinTrace() · also: is_within_trace

Is this thread actively tracing at this moment.

Returns: true if so