Package org.jruby
Class RubyRegexp
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyRegexp
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,ReOptions,InstanceVariables,InternalVariables,IRubyObject,EncodingCapable,MarshalEncoding,CoreObjectType
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprivate static final intprivate RegexpOptions(package private) org.joni.Regex(package private) static final WeakValuedMap<ByteList,org.joni.Regex> (package private) static final WeakValuedMap<ByteList,org.joni.Regex> private static final intrb_reg_quote(package private) static final WeakValuedMap<ByteList,org.joni.Regex> private ByteListprivate static final ThreadLocal<IRubyObject[]>Fields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAYFields inherited from interface org.jruby.parser.ReOptions
RE_DEFAULT, RE_FIXED, RE_LITERAL, RE_MAY_IGNORECASE, RE_NONE, RE_OPTION_EXTENDED, RE_OPTION_IGNORECASE, RE_OPTION_LONGEST, RE_OPTION_MULTILINE, RE_OPTION_NONE, RE_OPTION_ONCE, RE_OPTION_POSIXLINE, RE_OPTION_SINGLELINE, RE_UNICODE -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)RubyRegexp(Ruby runtime) default constructorRubyRegexp(Ruby runtime, org.joni.Regex pattern, ByteList str, RegexpOptions options) privateRubyRegexp(Ruby runtime, RubyClass klass) used by allocatorprivateRubyRegexp(Ruby runtime, ByteList str) privateRubyRegexp(Ruby runtime, ByteList str, RegexpOptions options) -
Method Summary
Modifier and TypeMethodDescription(package private) final intadjustStartPos(RubyString str, int pos, boolean reverse) private static intadjustStartPosInternal(RubyString str, org.jcodings.Encoding enc, int pos, boolean reverse) private static final intASCGET(boolean acompat, byte[] sBytes, int s, int e, int[] cl, org.jcodings.Encoding strEnc) casefold_p(ThreadContext context) private voidcheck()voidvoid(package private) static RubyMatchDatacreateMatchData(ThreadContext context, RubyString str, int pos, RubyString pattern) (package private) static RubyMatchDatacreateMatchData(ThreadContext context, RubyString str, org.joni.Matcher matcher, org.joni.Regex pattern) static RubyClasscreateRegexpClass(Ruby runtime) encoding(ThreadContext context) private static voidencodingMatchError(Ruby runtime, org.joni.Regex pattern, org.jcodings.Encoding strEnc) eqq(ThreadContext context, IRubyObject arg) rb_reg_eqqeqq19(ThreadContext context, IRubyObject arg) Deprecated.fixed_encoding_p(ThreadContext context) static IRubyObjectgetBackRef(ThreadContext context) Deprecated.org.jcodings.EncodinggetKCode()org.jcodings.EncodingString[]getNames()returns all names in a regexp pattern as id (8859_1) stringsThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.final RegexpOptionsrb_reg_optionsfinal org.joni.Regexprivate static org.joni.RegexgetPreprocessedRegexpFromCache(Ruby runtime, ByteList bytes, org.jcodings.Encoding enc, RegexpOptions options, RegexpSupport.ErrorMode mode) (package private) static org.joni.RegexgetQuotedRegexpFromCache(Ruby runtime, RubyString str, RegexpOptions options) static org.joni.RegexgetRegexpFromCache(Ruby runtime, ByteList bytes, org.jcodings.Encoding enc, RegexpOptions options) hash()rb_obj_id Will return the hash code of this object.rb_reg_init_copyinitialize_m(IRubyObject arg) initialize_m(IRubyObject arg0, IRubyObject arg1) initialize_m(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) Deprecated.initialize_m19(IRubyObject arg0, IRubyObject arg1) Deprecated.initialize_m19(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) Deprecated.private IRubyObjectinitializeByRegexp(RubyRegexp regexp) inspect()rb_reg_inspectDeprecated.booleanbooleanbooleanstatic IRubyObjectlast_match(IRubyObject match) rb_reg_last_matchstatic IRubyObjectlast_match_s(ThreadContext context, IRubyObject recv) rb_reg_s_last_match / match_getterstatic IRubyObjectlast_match_s(ThreadContext context, IRubyObject recv, IRubyObject nth) rb_reg_s_last_matchfinal intlength()private static org.joni.RegexmakeRegexp(Ruby runtime, ByteList bytes, RegexpOptions options, org.jcodings.Encoding enc) static voidmarshalTo(RubyRegexp regexp, MarshalStream output) static IRubyObjectmatch_last(IRubyObject match) rb_reg_match_lastfinal IRubyObjectmatch_m(ThreadContext context, IRubyObject str, boolean useBackref) match_m(ThreadContext context, IRubyObject str, Block block) rb_reg_match_mmatch_m(ThreadContext context, IRubyObject str, IRubyObject pos, Block block) match_m19(ThreadContext context, IRubyObject str) Deprecated.match_m19(ThreadContext context, IRubyObject str, boolean useBackref, Block block) Deprecated.match_p(ThreadContext context, IRubyObject str) match_p(ThreadContext context, IRubyObject str, IRubyObject pos) static IRubyObjectmatch_post(IRubyObject match) rb_reg_match_poststatic IRubyObjectmatch_pre(IRubyObject match) rb_reg_match_preprivate IRubyObjectmatchCommon(ThreadContext context, IRubyObject str, int pos, boolean setBackref, Block block) static intmatcherMatch(Ruby runtime, org.joni.Matcher matcher, int start, int range, int option) Deprecated.static intmatcherMatch(ThreadContext context, org.joni.Matcher matcher, int start, int range, int option) static intmatcherSearch(Ruby runtime, org.joni.Matcher matcher, int start, int range, int option) Deprecated.static intmatcherSearch(ThreadContext context, org.joni.Matcher matcher, int start, int range, int option) private RubyBooleanmatchP(ThreadContext context, IRubyObject arg, int pos) private intmatchPos(ThreadContext context, IRubyObject arg, RubyString[] strp, boolean useBackref, int pos) MRI: reg_match_posnamed_captures(ThreadContext context) rb_reg_named_capturesnames(ThreadContext context) rb_reg_namesstatic RubyRegexpnewDRegexp(Ruby runtime, RubyString pattern, int joniOptions) static RubyRegexpnewDRegexp(Ruby runtime, RubyString pattern, RegexpOptions options) (package private) static RubyRegexpnewDummyRegexp(Ruby runtime, org.joni.Regex regex) static RubyRegexpnewRegexp(Ruby runtime, String pattern, RegexpOptions options) static RubyRegexpstatic RubyRegexp(package private) static RubyRegexpstatic RubyRegexpnewRegexp(Ruby runtime, ByteList pattern, RegexpOptions options) static RubyRegexpnewRegexpFromStr(Ruby runtime, RubyString s, int options) static RubyRegexpnewRegexpParser(Ruby runtime, ByteList pattern, RegexpOptions options) throws RaiseException on error so parser can pick this up and give proper line and line number error as opposed to any non-literal regexp creation which may raise a syntax error but will not have this extra source info in the error message(package private) static IRubyObjectnth_match(int nth, RubyMatchData match) static IRubyObjectnth_match(int nth, IRubyObject match) rb_reg_nth_matchprivate static intop_equal(ThreadContext context, IRubyObject other) rb_obj_equal Will by default use identity equality to compare objects.op_match(ThreadContext context, IRubyObject str) rb_obj_pattern_match call-seq: obj =~ other => nil Pattern Match---Overridden by descendents (notablyRegexpandString) to provide meaningful pattern-match semantics.op_match19(ThreadContext context, IRubyObject str) Deprecated.op_match2(ThreadContext context) op_match219(ThreadContext context) Deprecated.private static RubyStringoperandCheck(IRubyObject str) private static IRubyObjectoptions()private org.jcodings.EncodingprepareEncoding(RubyString str, boolean warn) final org.joni.RegexpreparePattern(RubyString str) static voidpreprocessCheck(Ruby runtime, ByteList bytes) static RubyStringpreprocessDRegexp(Ruby runtime, RubyString[] strings, int embeddedOptions) Deprecated.static RubyStringpreprocessDRegexp(Ruby runtime, IRubyObject[] strings, RegexpOptions options) static RubyStringpreprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, RegexpOptions options) Deprecated.static RubyStringpreprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, RegexpOptions options) Deprecated.static RubyStringpreprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, RegexpOptions options) Deprecated.static RubyStringpreprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, RegexpOptions options) Deprecated.static RubyStringpreprocessDRegexp(Ruby runtime, IRubyObject arg0, RegexpOptions options) Deprecated.static RubyStringpreprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject arg0) static RubyStringpreprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject... args) static RubyStringpreprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject arg0, IRubyObject arg1) static RubyStringpreprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) private static voidpreprocessLight(Ruby runtime, ByteList str, org.jcodings.Encoding enc, org.jcodings.Encoding[] fixedEnc, RegexpSupport.ErrorMode mode) Preprocess the given string for use in regexp, raising errors for encoding incompatibilities that arise.private static org.jcodings.EncodingprocessDRegexpElement(Ruby runtime, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc, RubyString str) private static RubyStringprocessElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) private static RubyStringprocessElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) private static RubyStringprocessElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) private static RubyStringprocessElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) private static RubyStringprocessElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) (package private) static ByteListquote(RubyString str) static RubyStringquote(ThreadContext context, IRubyObject recv, IRubyObject arg) rb_reg_s_quote(package private) static ByteListstatic IRubyObjectquote19(ThreadContext context, IRubyObject recv, IRubyObject arg) Deprecated.static ByteListDeprecated.final RubyRegexpregexpInitialize(ByteList bytes, org.jcodings.Encoding enc, RegexpOptions options) private RubyRegexpregexpInitializeString(RubyString str, RegexpOptions options) private static IRubyObjectregOperand(IRubyObject str, boolean check) (package private) static RubyStringregsub(ThreadContext context, RubyString str, RubyString src, org.joni.Regex pattern, org.joni.Matcher matcher) (package private) static RubyStringregsub(ThreadContext context, RubyString str, RubyString src, org.joni.Regex pattern, org.joni.Region regs, int begin, int end) final intsearch(ThreadContext context, RubyString str, int pos, boolean reverse) MRI: rb_reg_search This version uses current thread context to hold the resulting match data.final intsearch(ThreadContext context, RubyString str, int pos, boolean reverse, IRubyObject[] holder) Deprecated.final intsearch19(ThreadContext context, RubyString str, int pos, boolean reverse) Deprecated.final intsearch19(ThreadContext context, RubyString str, int pos, boolean reverse, IRubyObject[] holder) Deprecated.final intsearchString(ThreadContext context, RubyString str, int pos, boolean reverse) Search the given string with this Regexp.voidsetEncoding(org.jcodings.Encoding encoding) voidvoidbooleansource()rb_reg_source(package private) final booleanstartsWith(ThreadContext context, RubyString str) final RubyBooleanstartWithP(ThreadContext context, RubyString str) Deprecated.to_s()rb_any_to_s call-seq: obj.to_s => string Returns a string representing obj.static IRubyObjecttry_convert(ThreadContext context, IRubyObject recv, IRubyObject args) static IRubyObjectunion(ThreadContext context, IRubyObject recv, IRubyObject[] args) rb_reg_s_unionstatic IRubyObjectunion19(ThreadContext context, IRubyObject recv, IRubyObject[] args) Deprecated.static RubyRegexpunmarshalFrom(UnmarshalStream input) Deprecated.Methods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, dig1, dig2, eqlInternal, equalInternal, equals, hashCode, inspect, op_eqq, puts, specificEval, toRubyString, toStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, defaultToJava, display, dup, ensureInstanceVariablesSettable, eql, eql_p, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, infectBy, infectBy, initialize, initialize19, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method, method_missing, method_missing19, method19, methods, methods, methods19, methodsImpl, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_equal_19, op_not, op_not_equal, op_not_match, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbClone, rbInspect, recacheBuiltinMethods, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted, tainted_p, testFrozen, testFrozen, to_a, to_a, toJava, trust, type, type_deprecated, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
-
Field Details
-
pattern
org.joni.Regex pattern -
str
-
options
-
TL_HOLDER
-
ARG_ENCODING_FIXED
public static final int ARG_ENCODING_FIXED- See Also:
-
ARG_ENCODING_NONE
public static final int ARG_ENCODING_NONE- See Also:
-
patternCache
-
quotedPatternCache
-
preprocessedPatternCache
-
QUOTED_V
private static final int QUOTED_Vrb_reg_quote- See Also:
-
EMBEDDABLE
private static final int EMBEDDABLE- See Also:
-
-
Constructor Details
-
RubyRegexp
used by allocator -
RubyRegexp
RubyRegexp(Ruby runtime) default constructor -
RubyRegexp
-
RubyRegexp
-
RubyRegexp
-
-
Method Details
-
setLiteral
public void setLiteral() -
clearLiteral
public void clearLiteral() -
isLiteral
public boolean isLiteral() -
isKCodeDefault
public boolean isKCodeDefault() -
setEncodingNone
public void setEncodingNone() -
clearEncodingNone
public void clearEncodingNone() -
isEncodingNone
public boolean isEncodingNone() -
getKCode
-
getEncoding
public org.jcodings.Encoding getEncoding()- Specified by:
getEncodingin interfaceEncodingCapable
-
setEncoding
public void setEncoding(org.jcodings.Encoding encoding) - Specified by:
setEncodingin interfaceEncodingCapable
-
shouldMarshalEncoding
public boolean shouldMarshalEncoding()- Specified by:
shouldMarshalEncodingin interfaceMarshalEncoding
-
getMarshalEncoding
public org.jcodings.Encoding getMarshalEncoding()- Specified by:
getMarshalEncodingin interfaceMarshalEncoding
-
makeRegexp
private static org.joni.Regex makeRegexp(Ruby runtime, ByteList bytes, RegexpOptions options, org.jcodings.Encoding enc) -
getRegexpFromCache
public static org.joni.Regex getRegexpFromCache(Ruby runtime, ByteList bytes, org.jcodings.Encoding enc, RegexpOptions options) -
getQuotedRegexpFromCache
-
getPreprocessedRegexpFromCache
private static org.joni.Regex getPreprocessedRegexpFromCache(Ruby runtime, ByteList bytes, org.jcodings.Encoding enc, RegexpOptions options, RegexpSupport.ErrorMode mode) -
createRegexpClass
-
matcherSearch
public static int matcherSearch(ThreadContext context, org.joni.Matcher matcher, int start, int range, int option) -
matcherMatch
public static int matcherMatch(ThreadContext context, org.joni.Matcher matcher, int start, int range, int option) -
matcherSearch
@Deprecated public static int matcherSearch(Ruby runtime, org.joni.Matcher matcher, int start, int range, int option) Deprecated. -
matcherMatch
@Deprecated public static int matcherMatch(Ruby runtime, org.joni.Matcher matcher, int start, int range, int option) Deprecated. -
getNativeClassIndex
Description copied from class:RubyObjectThis is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex- Specified by:
getNativeClassIndexin interfaceCoreObjectType- Overrides:
getNativeClassIndexin classRubyObject- See Also:
-
newRegexp
-
newRegexp
-
newRegexp
-
newRegexpParser
throws RaiseException on error so parser can pick this up and give proper line and line number error as opposed to any non-literal regexp creation which may raise a syntax error but will not have this extra source info in the error message -
newDRegexp
-
newDRegexp
-
newRegexp
-
newRegexp
-
newDummyRegexp
-
newRegexpFromStr
-
getOptions
rb_reg_options -
getPattern
public final org.joni.Regex getPattern() -
encodingMatchError
private static void encodingMatchError(Ruby runtime, org.joni.Regex pattern, org.jcodings.Encoding strEnc) -
prepareEncoding
-
preparePattern
-
preprocessLight
private static void preprocessLight(Ruby runtime, ByteList str, org.jcodings.Encoding enc, org.jcodings.Encoding[] fixedEnc, RegexpSupport.ErrorMode mode) Preprocess the given string for use in regexp, raising errors for encoding incompatibilities that arise. This version does not produce a new, unescaped version of the bytelist, and simply does the string-walking portion of the logic.- Parameters:
runtime- current runtimestr- string to preprocessenc- string's encodingfixedEnc- new encoding after fixingmode- mode of errors
-
preprocessCheck
-
preprocessDRegexp
@Deprecated public static RubyString preprocessDRegexp(Ruby runtime, RubyString[] strings, int embeddedOptions) Deprecated. -
preprocessDRegexp
public static RubyString preprocessDRegexp(Ruby runtime, IRubyObject[] strings, RegexpOptions options) -
preprocessDRegexp
public static RubyString preprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject... args) -
preprocessDRegexp
public static RubyString preprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject arg0) -
preprocessDRegexp
@Deprecated public static RubyString preprocessDRegexp(Ruby runtime, IRubyObject arg0, RegexpOptions options) Deprecated. -
preprocessDRegexp
public static RubyString preprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject arg0, IRubyObject arg1) -
preprocessDRegexp
@Deprecated public static RubyString preprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, RegexpOptions options) Deprecated. -
preprocessDRegexp
public static RubyString preprocessDRegexp(ThreadContext context, RegexpOptions options, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) -
preprocessDRegexp
@Deprecated public static RubyString preprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, RegexpOptions options) Deprecated. -
preprocessDRegexp
@Deprecated public static RubyString preprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, RegexpOptions options) Deprecated. -
preprocessDRegexp
@Deprecated public static RubyString preprocessDRegexp(Ruby runtime, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, RegexpOptions options) Deprecated. -
processElementIntoResult
private static RubyString processElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) -
processElementIntoResult
private static RubyString processElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) -
processElementIntoResult
private static RubyString processElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) -
processElementIntoResult
private static RubyString processElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, IRubyObject arg1, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) -
processElementIntoResult
private static RubyString processElementIntoResult(Ruby runtime, RubyString result, IRubyObject arg0, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc) -
processDRegexpElement
private static org.jcodings.Encoding processDRegexpElement(Ruby runtime, RegexpOptions options, org.jcodings.Encoding regexpEnc, org.jcodings.Encoding[] fixedEnc, RubyString str) -
check
private void check() -
try_convert
-
quote
rb_reg_s_quote -
quote19
@Deprecated public static IRubyObject quote19(ThreadContext context, IRubyObject recv, IRubyObject arg) Deprecated. -
quote
-
quote
-
quote19
Deprecated. -
last_match_s
rb_reg_s_last_match / match_getter -
last_match_s
rb_reg_s_last_match -
union
rb_reg_s_union -
union19
@Deprecated public static IRubyObject union19(ThreadContext context, IRubyObject recv, IRubyObject[] args) Deprecated. -
initialize_copy
rb_reg_init_copy- Overrides:
initialize_copyin classRubyBasicObject
-
objectAsJoniOptions
-
initialize_m
-
initialize_m
-
initialize_m
-
initialize_m19
Deprecated. -
initialize_m19
Deprecated. -
initialize_m19
Deprecated. -
initializeByRegexp
-
regexpInitializeString
-
regexpInitialize
public final RubyRegexp regexpInitialize(ByteList bytes, org.jcodings.Encoding enc, RegexpOptions options) -
hash
Description copied from class:RubyBasicObjectrb_obj_id Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.- Overrides:
hashin classRubyBasicObject
-
op_equal
Description copied from class:RubyBasicObjectrb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics. The name of this method doesn't follow the convention because hierarchy problems- Specified by:
op_equalin interfaceIRubyObject- Overrides:
op_equalin classRubyBasicObject
-
op_match219
Deprecated. -
op_match2
-
eqq
rb_reg_eqq -
eqq19
Deprecated. -
op_match
Description copied from class:RubyBasicObjectrb_obj_pattern_match call-seq: obj =~ other => nil Pattern Match---Overridden by descendents (notablyRegexpandString) to provide meaningful pattern-match semantics.- Overrides:
op_matchin classRubyBasicObject
-
match_m
rb_reg_match_m -
match_m
-
match_m
-
match_p
-
match_p
-
matchCommon
private IRubyObject matchCommon(ThreadContext context, IRubyObject str, int pos, boolean setBackref, Block block) -
matchPos
private int matchPos(ThreadContext context, IRubyObject arg, RubyString[] strp, boolean useBackref, int pos) MRI: reg_match_pos- Parameters:
context- thread contextarg- the stringlike to matchstrp- an out param to hold the coerced string; ignored if nulluseBackref- whether to update the current execution frame's backrefpos- the position from which to start matching
-
matchP
-
search
MRI: rb_reg_search This version uses current thread context to hold the resulting match data. -
startsWith
-
startWithP
Deprecated. -
searchString
Search the given string with this Regexp. MRI: rb_reg_search0 without backref updating -
createMatchData
static RubyMatchData createMatchData(ThreadContext context, RubyString str, org.joni.Matcher matcher, org.joni.Regex pattern) -
createMatchData
static RubyMatchData createMatchData(ThreadContext context, RubyString str, int pos, RubyString pattern) -
options
-
casefold_p
-
source
rb_reg_source -
length
public final int length() -
inspect
rb_reg_inspect- Specified by:
inspectin interfaceIRubyObject- Overrides:
inspectin classRubyBasicObject- Returns:
- String
-
inspect19
Deprecated. -
to_s
Description copied from class:RubyBasicObjectrb_any_to_s call-seq: obj.to_s => string Returns a string representing obj. The defaultto_sprints the object's class and an encoding of the object id. As a special case, the top-level object that is the initial execution context of Ruby programs returns ``main.''- Overrides:
to_sin classRubyBasicObject
-
getNames
returns all names in a regexp pattern as id (8859_1) strings- Returns:
- array of id strings.
-
names
rb_reg_names -
named_captures
rb_reg_named_captures -
encoding
-
fixed_encoding_p
-
nth_match
rb_reg_nth_match -
nth_match
-
last_match
rb_reg_last_match -
match_pre
rb_reg_match_pre -
match_post
rb_reg_match_post -
match_last
rb_reg_match_last -
ASCGET
private static final int ASCGET(boolean acompat, byte[] sBytes, int s, int e, int[] cl, org.jcodings.Encoding strEnc) -
regsub
static RubyString regsub(ThreadContext context, RubyString str, RubyString src, org.joni.Regex pattern, org.joni.Matcher matcher) -
regsub
static RubyString regsub(ThreadContext context, RubyString str, RubyString src, org.joni.Regex pattern, org.joni.Region regs, int begin, int end) -
adjustStartPos
-
adjustStartPosInternal
private static int adjustStartPosInternal(RubyString str, org.jcodings.Encoding enc, int pos, boolean reverse) -
operandNoCheck
-
operandCheck
-
regOperand
-
unmarshalFrom
Deprecated.- Throws:
IOException
-
marshalTo
- Throws:
IOException
-
search19
@Deprecated public final int search19(ThreadContext context, RubyString str, int pos, boolean reverse) Deprecated. -
search19
@Deprecated public final int search19(ThreadContext context, RubyString str, int pos, boolean reverse, IRubyObject[] holder) Deprecated. -
search
@Deprecated public final int search(ThreadContext context, RubyString str, int pos, boolean reverse, IRubyObject[] holder) Deprecated. -
getBackRef
Deprecated. -
op_match19
Deprecated.- Overrides:
op_match19in classRubyBasicObject
-
match_m19
Deprecated. -
match_m19
@Deprecated public IRubyObject match_m19(ThreadContext context, IRubyObject str, boolean useBackref, Block block) Deprecated.
-