From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 4E5F717DE367 for ; Tue, 24 Feb 2015 19:00:01 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 21669B5D8D0 for ; Tue, 24 Feb 2015 19:03:46 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 4973797A82C for ; Tue, 24 Feb 2015 19:03:48 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cCiivZtzqqOH for ; Tue, 24 Feb 2015 19:03:47 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id BE53997A827 for ; Tue, 24 Feb 2015 19:03:47 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id CE69F952408 for ; Tue, 24 Feb 2015 19:03:44 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 0FD2712045E; Tue, 24 Feb 2015 19:03:41 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id A2B01120449 for ; Tue, 24 Feb 2015 19:03:37 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=czARHfHB0a+PsCPLOVzlVTtNdYg=; b=u/9K7xIkp3zJGyTjYw 0XNm6wYvW/rNVSUNtOTEdt5NxQpLMrH8nxKnFMwRp0uts4Spfp19ProMRl38PhX9 BUn9TCrE5Tl/bAdxIDwjwzMJGTYqWH2vJDacDxY3WIrfbaCjgWsEb9QLS6KTmupL eZ3Suh1lz0z7S448YDlArG3iU= Received: by filter0060p1mdw1.sendgrid.net with SMTP id filter0060p1mdw1.11995.54EC4C6E4 2015-02-24 10:03:26.745123871 +0000 UTC Received: from herokuapp.com (ec2-54-227-23-142.compute-1.amazonaws.com [54.227.23.142]) by ismtpd-012 (SG) with ESMTP id 14bbb0a9057.546f.26e40 for ; Tue, 24 Feb 2015 10:03:26 +0000 (UTC) Date: Tue, 24 Feb 2015 10:03:26 +0000 From: lord.thom@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 42708 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10891 X-Redmine-Issue-Author: tom-lord X-Redmine-Issue-Assignee: X-Redmine-Sender: tom-lord X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: OOF Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS7cGBCmSdftc1v/UG7oUAF/HXzpoYc6tpcmnQ ojlQW4JWyIL0fbmcUQ4N9ZUrQcWi27Rs9uQ3DZbkqg9ma7OCjrNwMOpafblORcDrNKczhvH5RR0zr/ 2+/BLsfHzWqDyhokdekKbjcgmEV7uCi8KYuD X-ML-Name: ruby-core X-Mail-Count: 68280 Subject: [ruby-core:68280] [Ruby trunk - Bug #10891] /[[:punct:]]/ POSIX group broken (with string literals?) X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10891 has been updated by Tom Lord. On further investigation, this is a known issue in Onigmo (Ruby 2.x's regexp parser). However, it was apparently "fixed" way back in 2006: https://github.com/k-takata/Onigmo/blob/d0b3173893b9499a4e53ae1da16ba76c06d85571/HISTORY#L584-585 (Note: I can't find a reference to any Oniguruma/Onigmo source control dating back this far, to see the actual commit) ...And yet, it remains an open issue: https://github.com/k-takata/Onigmo/issues/42 ---------------------------------------- Bug #10891: /[[:punct:]]/ POSIX group broken (with string literals?) https://bugs.ruby-lang.org/issues/10891#change-51638 * Author: Tom Lord * Status: Open * Priority: Normal * Assignee: ruby-core * ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- The regular expression: `/[[:punct:]]/` should match the following characters: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ However, it only works for these characters: ! " # % & ' ( ) * , - . / : ; ? @ [ \\ ] _ { } And does not work for these characters: $ + < = > ^ ` | ~ However, this is where it gets really weird... Consider the following: 60.chr == "<" # true 60.chr =~ /[[:punct:]]/ # => 0 "<" =~ /[[:punct:]]/ # => nil So, it seems that the regular expression only fails for string literals! -- https://bugs.ruby-lang.org/