Actions
Backport #1196
closed正規表現の \s と [\s] が異なる
Status:
Closed
Assignee:
Description
=begin
正規表現の \s には \v が含まれませんが、[\s] には \v が含まれるようです。
$ ruby -v -e 'p "\v" =~ /\s/'
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
nil
$ ruby -v -e 'p "\v" =~ /[\s]/'
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
0
以下のパッチで直ると思います。
--- regex.c.orig 2008-08-04 14:15:15.000000000 +0900
+++ regex.c 2009-02-23 18:17:57.000000000 +0900
@@ -2244,6 +2244,7 @@
SET_LIST_BIT('\n');
SET_LIST_BIT('\r');
SET_LIST_BIT('\f');
-
SET_LIST_BIT('\v'); } else { char cc;
=end
Updated by nobu (Nobuyoshi Nakada) about 15 years ago
- Category set to core
- Status changed from Open to Closed
- Assignee set to matz (Yukihiro Matsumoto)
=begin
Applied at changeset 22585.
=end
Updated by shyouhei (Shyouhei Urabe) almost 15 years ago
- Category set to core
- Status changed from Closed to Open
- Assignee changed from matz (Yukihiro Matsumoto) to shyouhei (Shyouhei Urabe)
=begin
1.8.7にバックポートするか考え中。
=end
Updated by shyouhei (Shyouhei Urabe) over 13 years ago
- Status changed from Open to Assigned
=begin
=end
Updated by shyouhei (Shyouhei Urabe) over 7 years ago
- Status changed from Assigned to Closed
Actions
Like0
Like0Like0Like0Like0