Skip to content

Commit

Permalink
Specified change in Regexp :blank: POSIX expression
Browse files Browse the repository at this point in the history
In Ruby < 2.2 the :blank: POSIX expression matched unicode Mongolian
vowel seperator characters.  In Ruby >= 2.2 these characters do not
match.
  • Loading branch information
anthonycrumley authored and eregon committed Feb 22, 2015
1 parent a1b2ded commit 6076e90
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions language/regexp/character_classes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@
"\u{3F}".match(/[[:alpha:]]/).to_a.should == []
end

ruby_version_is ""..."2.2" do
it "matches Unicode Mongolian vowel seperator characters with [[:blank:]]" do
"\u{180E}".match(/[[:blank:]]/).to_a.should == ["\u{180E}"]
end
end

ruby_version_is "2.2" do
it "doesn't match Unicode Mongolian vowel seperator characters with [[:blank:]]" do
"\u{180E}".match(/[[:blank:]]/).to_a.should == []
end
end

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

0 comments on commit 6076e90

Please sign in to comment.