From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_GREY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 57E551F4D7 for ; Wed, 25 May 2022 03:02:28 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sendgrid.me header.i=@sendgrid.me header.b="Vqszae7D"; dkim-atps=neutral Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 7EC5A1209E5; Wed, 25 May 2022 12:02:23 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 5BE77120AF2 for ; Wed, 25 May 2022 12:02:21 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.me; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to; s=smtpapi; bh=3eDvZ0ZSrqEi45dRtOR46aTpVzOHBjlyuS4U7OGBs/0=; b=Vqszae7DESQ4WQVx5K2vmVQeWSXkGuM8EGDcmNAFynpDCkQ+ifhgtMCy0uXDr0BVmXbj ZYBIbGU5LmJcqTAYp1QXJ3c/MkhnP/xi/elzb7frGKdzefjV4Cz7xOrpsCjJrdlRtwirWo Bt6BfncQvEdHtuxYmkHAxUWhbTWc4isi0= Received: by filterdrecv-5645d9c87f-hmtpr with SMTP id filterdrecv-5645d9c87f-hmtpr-1-628D9C3B-4 2022-05-25 03:02:19.100596851 +0000 UTC m=+4166285.600006249 Received: from herokuapp.com (unknown) by geopod-ismtpd-4-1 (SG) with ESMTP id AMv2pedSTwKqkJqbQbBl3A for ; Wed, 25 May 2022 03:02:18.956 +0000 (UTC) Date: Wed, 25 May 2022 03:02:19 +0000 (UTC) From: "mame (Yusuke Endoh)" Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 18802 X-Redmine-Issue-Author: cohei X-Redmine-Sender: mame X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 85058 X-SG-EID: =?us-ascii?Q?YbSlef6ZOa=2FS=2FuqSxXRzl42MttQDxKOujGe43WuBjI7JKMg2OkmRsyzG5za6L9?= =?us-ascii?Q?e1flZkYZ9OViVy5Lc4acvpZpKjxRFQXzjzLS=2FrB?= =?us-ascii?Q?432EHSzCS9SSyOFP3X4v0KB7XeKuvrzUteAQoXM?= =?us-ascii?Q?4kBCwnAtzDY52FGpKZM=2FZiazEXYu=2Fr+vK5U=2FpX8?= =?us-ascii?Q?v1hAub0+C+qC+Bsj4H9OFn38sGkuI+Q1knRPvPB?= =?us-ascii?Q?wHOWk=2FNRtQ=2Ffk6CVdheJMwzrj6jlFOhzRWEMzql?= =?us-ascii?Q?l5IwN2062KRWAptBHj4iw=3D=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 51183 Subject: [ruby-dev:51183] [Ruby master Bug#18802] Negation of POSIX character class does not work X-BeenThere: ruby-dev@ruby-lang.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Ruby developers \(Japanese\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: "Ruby developers \(Japanese\)" Errors-To: ruby-dev-bounces@ruby-lang.org Sender: "ruby-dev" Issue #18802 has been updated by mame (Yusuke Endoh).=0D =0D Status changed from Open to Rejected=0D =0D Note that the sentence is written in [the section of character class](https= ://docs.ruby-lang.org/ja/3.1/doc/spec=3D2fregexp.html#string). So `[:^ascii= :]` must be used in a character class as follows:=0D =0D ```=0D irb(main):001:0> %w[=E3=81=82=E3=81=82=E3=81=82 =E3=81=82 a b :].map { _1.m= atch?(/[[:^ascii:]]/) }=0D =3D> [true, true, false, false, false]=0D ```=0D =0D If you want to improve the Japanese document, please contact on https://git= hub.com/rurema/doctree/issues .=0D =0D ----------------------------------------=0D Bug #18802: Negation of POSIX character class does not work=0D https://bugs.ruby-lang.org/issues/18802#change-97731=0D =0D * Author: cohei (=E6=98=82=E5=B9=B3 =E8=B0=B7=E5=8F=A3)=0D * Status: Rejected=0D * Priority: Normal=0D * ruby -v: 3.1.2=0D * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN=0D ----------------------------------------=0D > https://docs.ruby-lang.org/ja/3.1/doc/spec=3D2fregexp.html#charclass_posi= x=0D > =E3=81=BE=E3=81=9F=E3=80=81[:^=E3=82=AF=E3=83=A9=E3=82=B9=E5=90=8D:]=E3= =81=A8=E3=81=84=E3=81=86=E8=A8=98=E6=B3=95=E3=81=A7=E3=81=9D=E3=81=AE=E5=90= =A6=E5=AE=9A=E3=82=92=E6=84=8F=E5=91=B3=E3=81=97=E3=81=BE=E3=81=99=E3=80=82=0D =0D For example, `[:^ascii:]` is the negation of `[:ascii:]` according to the d= ocument. But it does not work:=0D =0D ```ruby=0D irb(main):001:0> RUBY_VERSION=0D =3D> "3.1.2"=0D irb(main):002:0> %w[=E3=81=82=E3=81=82=E3=81=82 =E3=81=82 a b :].map { _1.m= atch?(/[:^ascii:]/) }=0D =3D> [false, false, true, false, true] # matches a, c, i, s, : or ^=0D irb(main):003:0> %w[=E3=81=82=E3=81=82=E3=81=82 =E3=81=82 a b :].map { _1.m= atch?(/[^[:ascii:]]/) }=0D =3D> [true, true, false, false, false] # expected=0D ```=0D =0D =0D =0D --=20=0D https://bugs.ruby-lang.org/=0D