<commit_before># -*- encoding: utf-8 -*-
# The examples below are based on the definitions in
# http://unicode.org/reports/tr18/ , which was deemed authoritative in
# http://redmine.ruby-lang.org/issues/show/1889 .

it "matches ASCII characters with [[:ascii:]]" do
  "\x00".match(/[[:ascii:]]/).to_a.should == ["\x00"]
  "\x7F".match(/[[:ascii:]]/).to_a.should == ["\x7F"]
end

it "doesn't match non-ASCII characters with [[:ascii:]]" do
  ('/[[:ascii:]]/').match("\u{80}").should be_nil
  ('/[[:ascii:]]/').match("\u{9898}").should be_nil
end

it "matches Unicode letter characters with [[:alnum:]]" do
  "à".match(/[[:alnum:]]/).to_a.should == ["à"]
end

it "matches Unicode digits with [[:alnum:]]" do
  "\u{0660}".match(/[[:alnum:]]/).to_a.should == ["\u{0660}"]
end

it "doesn't matches Unicode marks with [[:alnum:]]" do
  "\u{36F}".match(/[[:alnum:]]/).should be_nil
end

it "doesn't match Unicode control characters with [[:alnum:]]" do
  "\u{16}".match(/[[:alnum:]]/).to_a.should == []
end

it "doesn't match Unicode punctuation characters with [[:alnum:]]" do
  "\u{3F}".match(/[[:alnum:]]/).to_a.should == []
end

it "matches Unicode letter characters with [[:alpha:]]" do
  "à".match(/[[:alpha:]]/).to_a.should == ["à"]
end

it "doesn't match Unicode digits with [[:alpha:]]" do
  "\u{0660}".match(/[[:alpha:]]/).to_a.should == []
end

it "doesn't matches Unicode marks with [[:alpha:]]" do
  "\u{36F}".match(/[[:alpha:]]/).should be_nil
end

it "doesn't match Unicode control characters with [[:alpha:]]" do
  "\u{16}".match(/[[:alpha:]]/).to_a.should == []
end

it "doesn't match Unicode punctuation characters with [[:alpha:]]" do
  "\u{3F}".match(/[[:alpha:]]/).to_a.should == []
end

it "matches Unicode space characters with [[:blank:]]" do
  "\u{180E}".match(/[[:blank:]]/).to_a.should == ["\u{180E}"]
  "\u{1680}".match(/[[:blank:]]/).to_a.should == ["\u{1680}"]
end

it "doesn't match Unicode control characters with [[:blank:]]" do
  "\u{16}".match(/[[:blank:]]/).should be_nil
end

it "doesn't match Unicode punctuation characters with [[:blank:]]" do
  "\u{3F}".match(/[[:blank:]]/).should be_nil
end

it "doesn't match Unicode letter characters with [[:blank:]]" do
  "à".match(/[[:blank:]]/).should be_nil
end

it "doesn't match Unicode digits with [[:blank:]]" do<commit_msg>update for Unicode 7.0<commit_after># -*- encoding: utf-8 -*-
# The examples below are based on the definitions in
# http://unicode.org/reports/tr18/ , which was deemed authoritative in
# http://redmine.ruby-lang.org/issues/show/1889 .

it "matches ASCII characters with [[:ascii:]]" do
  "\x00".match(/[[:ascii:]]/).to_a.should == ["\x00"]
  "\x7F".match(/[[:ascii:]]/).to_a.should == ["\x7F"]
end

it "doesn't match non-ASCII characters with [[:ascii:]]" do
  ('/[[:ascii:]]/').match("\u{80}").should be_nil
  ('/[[:ascii:]]/').match("\u{9898}").should be_nil
end

it "matches Unicode letter characters with [[:alnum:]]" do
  "à".match(/[[:alnum:]]/).to_a.should == ["à"]
end

it "matches Unicode digits with [[:alnum:]]" do
  "\u{0660}".match(/[[:alnum:]]/).to_a.should == ["\u{0660}"]
end

it "doesn't matches Unicode marks with [[:alnum:]]" do
  "\u{36F}".match(/[[:alnum:]]/).should be_nil
end

it "doesn't match Unicode control characters with [[:alnum:]]" do
  "\u{16}".match(/[[:alnum:]]/).to_a.should == []
end

it "doesn't match Unicode punctuation characters with [[:alnum:]]" do
  "\u{3F}".match(/[[:alnum:]]/).to_a.should == []
end

it "matches Unicode letter characters with [[:alpha:]]" do
  "à".match(/[[:alpha:]]/).to_a.should == ["à"]
end

it "doesn't match Unicode digits with [[:alpha:]]" do
  "\u{0660}".match(/[[:alpha:]]/).to_a.should == []
end

it "doesn't matches Unicode marks with [[:alpha:]]" do
  "\u{36F}".match(/[[:alpha:]]/).should be_nil
end

it "doesn't match Unicode control characters with [[:alpha:]]" do
  "\u{16}".match(/[[:alpha:]]/).to_a.should == []
end

it "doesn't match Unicode punctuation characters with [[:alpha:]]" do
  "\u{3F}".match(/[[:alpha:]]/).to_a.should == []
end

it "matches Unicode space characters with [[:blank:]]" do
  "\u{1680}".match(/[[:blank:]]/).to_a.should == ["\u{1680}"]
end

it "doesn't match Unicode control characters with [[:blank:]]" do
  "\u{16}".match(/[[:blank:]]/).should be_nil
end

it "doesn't match Unicode punctuation characters with [[:blank:]]" do
  "\u{3F}".match(/[[:blank:]]/).should be_nil
end

it "doesn't match Unicode letter characters with [[:blank:]]" do
  "à".match(/[[:blank:]]/).should be_nil
end

it "doesn't match Unicode digits with [[:blank:]]" do
{'fraction_non_alphanumeric': 0.2512629035800571, 'fraction_numerical': 0.024599165385460135, 'mean_word_length': 4.50665054413543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '972270', 'n_tokens_mistral': 1878, 'n_tokens_neox': 1679, 'n_words': 418}