Skip to content

Returns nil instead of regex match group inside conditional #2787

@kaiserprogrammer

Description

@kaiserprogrammer

Problem with DBI gem under jruby-9.0.0.0.pre

def parse_url(driver_url)
  if driver_url =~ /^(DBI|dbi):([^:]+)(:(.*))$/ 
    [$2, $4]
  else
    raise InterfaceError, "Invalid Data Source Name"
  end
end

parse_url("dbi:jdbc:sqlite")

returns [nil, nil] instead of ["jdbc", "sqlite"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions