opal/corelib/regexp.rb
Method union
has 37 lines of code (exceeds 30 allowed). Consider refactoring. Open
Open
def union(*parts)
%x{
var is_first_part_array, quoted_validated, part, options, each_part_options;
if (parts.length == 0) {
return /(?!)/;
Method match
has 36 lines of code (exceeds 30 allowed). Consider refactoring. Open
Open
def match(string, pos = undefined, &block)
%x{
if (self.uninitialized) {
#{::Kernel.raise ::TypeError, 'uninitialized Regexp'}
}
Method inspect
has 33 lines of code (exceeds 30 allowed). Consider refactoring. Open
Open
def inspect
# Use a regexp to extract the regular expression and the optional mode modifiers from the string.
# In the regular expression, escape any front slash (not already escaped) with a backslash.
%x{
var regexp_format = /^\/(.*)\/([^\/]*)$/;