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 D204A1F4D7 for ; Wed, 25 May 2022 03:34:35 +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="GEXpjHD2"; dkim-atps=neutral Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id BFD98120D77; Wed, 25 May 2022 12:34:33 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id F3F50120D77 for ; Wed, 25 May 2022 12:34:31 +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=i2EBbc09wO5twH1+VPazzqKEbM5S53eLBEM9pRN6eEk=; b=GEXpjHD2Qsm+OLj+1//FJAz2nRT4xZDqx4UKB2B2LmxUQckIV/YCqEJzfltpvo2N5k9e K/63mSC/RZPnFE9s+s1+VPeGNy5mkXsQ4qvUTaIQt86NgXP3ZW2coNcBadsnCzXE22qbtY i0LEVREAHKulHbrIT5KZghYtvAtw+M19s= Received: by filterdrecv-5645d9c87f-8m4bh with SMTP id filterdrecv-5645d9c87f-8m4bh-1-628DA3C5-8 2022-05-25 03:34:29.179023907 +0000 UTC m=+4168209.850481238 Received: from herokuapp.com (unknown) by geopod-ismtpd-canary-0 (SG) with ESMTP id JFCQbB3MSKGqeH_yPjUi4w for ; Wed, 25 May 2022 03:34:29.044 +0000 (UTC) Date: Wed, 25 May 2022 03:34:29 +0000 (UTC) From: cohei 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: cohei 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: 85059 X-SG-EID: =?us-ascii?Q?4=2FJ6elt+zz7tRHWcoF0k9coKhHmM90XCuDYZYJZ2kqjNMQibY98Gnfz6gVXIyw?= =?us-ascii?Q?ioS8pOznXTQnX3POQVSutURZgtpuCwweeX4x0HL?= =?us-ascii?Q?tOkY2nEs5m0+YCOf=2FGwUXb1MQ9rGmzO6QeSmFnF?= =?us-ascii?Q?VQqrg5t33+=2FvFfN2e079K5KP3mElPxMk=2FOqhGSY?= =?us-ascii?Q?mhAMUY36+mAqvveqJa4ZdkJ1wlqLBnWAa=2FA8h3w?= =?us-ascii?Q?yCyvaIK5248yItLJnO2SJXjtH8WNbd1PGlH9fyP?= =?us-ascii?Q?e6EPtcmwLH4R432m7fugQ=3D=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 51184 Subject: [ruby-dev:51184] [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 cohei (=E6=98=82=E5=B9=B3 =E8=B0=B7=E5=8F= =A3).=0D =0D =0D Thank you! I misunderstood about character classes.=0D =0D ----------------------------------------=0D Bug #18802: Negation of POSIX character class does not work=0D https://bugs.ruby-lang.org/issues/18802#change-97732=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