From: "tenderlovemaking (Aaron Patterson)" Date: 2013-03-23T02:33:45+09:00 Subject: [ruby-core:53649] [ruby-trunk - Bug #8151][Open] Duplicate character class warning Issue #8151 has been reported by tenderlovemaking (Aaron Patterson). ---------------------------------------- Bug #8151: Duplicate character class warning https://bugs.ruby-lang.org/issues/8151 Author: tenderlovemaking (Aaron Patterson) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin12.2.1] I get a duplicate character class warning, but I think it's a bug. Here is the example code: ``` def embed exp, depth return exp if depth == 0 embed(/#{exp}/, depth - 1) end 3.times { |i| puts "DEPTH #{i + 1}" embed(/[a-z\u{7b}-\u{7d}]/, i + 1) } ``` At depth = 1, there is no warning, but greater than 1, I get a duplicate character class warning. I don't think the character class overlaps, so there should never be a warning. -- http://bugs.ruby-lang.org/