Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
elixir
0002-Fix-improper-regex-use-closes-9914.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Fix-improper-regex-use-closes-9914.patch of Package elixir
From 8491f0dc74f8bc89bb926b8130b45eaa5ba92c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@dashbit.co> Date: Sat, 28 Mar 2020 10:49:16 +0100 Subject: [PATCH] Fix improper regex use, closes #9914 --- lib/elixir/test/elixir/regex_test.exs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/elixir/test/elixir/regex_test.exs b/lib/elixir/test/elixir/regex_test.exs index 2aeef63f6..cb6fed9b7 100644 --- a/lib/elixir/test/elixir/regex_test.exs +++ b/lib/elixir/test/elixir/regex_test.exs @@ -91,8 +91,10 @@ defmodule RegexTest do assert <<0xA0::utf8>> =~ ~r/[[:space:]]/u assert <<0xA0::utf8>> =~ ~r/\s/u + # Erlang/OTP 23 raises badarg on invalid UTF-8. + # Earlier versions simply would not match. + assert catch_error(if <<?<, 255, ?>>> =~ ~r/<.>/u, do: flunk("failed"), else: raise("failed")) assert <<?<, 255, ?>>> =~ ~r/<.>/ - refute <<?<, 255, ?>>> =~ ~r/<.>/u end test "ungreedy" do @@ -349,6 +351,6 @@ defmodule RegexTest do end defp matches_escaped?(string, match) do - Regex.match?(~r/#{Regex.escape(string)}/simxu, match) + Regex.match?(~r/#{Regex.escape(string)}/simx, match) end end -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor