Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Mongolian Vowel Separator" is not considered whitespace after Ruby 2.2
[Ruby Issue 9092](https://bugs.ruby-lang.org/issues/9092) updated Ruby from Unicode 6.1 to Unicode 7.0 ([commit here](ruby/ruby@64c81e4#diff-67d181a69374a75e4b8f706fa9b81fbc)). This patch was included in Ruby 2.2. From the [Unicode 6.3.0 release notes](http://www.unicode.org/versions/Unicode6.3.0/): The General_Category property value of U+180E MONGOLIAN VOWEL SEPARATOR has been changed from Zs to Cf. The values of other related properties such as Bidi_Class, White_Space, and Other_Default_Ignorable_Code_Point have been updated accordingly. After 2.2 shipped, Ruby's [[:space:]] Regexp expression [no longer matches U+180E](https://github.com/ruby/ruby/blob/9fefa6063797f94704c09663db13cea9e390eaba/enc/unicode/name2ctype.h#L2740-L2753). This updates fast_blank to treat U+180E properly in blank_as? Prior to this change, the tests fail on 2.2.2: 1) String provides a parity with active support function Failure/Error: expect("#{i.to_s(16)} #{c.blank_as?}").to eq("#{i.to_s(16)} #{c.blank2?}") - expected: "180e false" got: "180e true" - (compared using ==) # ./spec/fast_blank_spec.rb:22:in `block (3 levels) in <top (required)>' # ./spec/fast_blank_spec.rb:19:in `times' # ./spec/fast_blank_spec.rb:19:in `block (2 levels) in <top (required)>' It now passes on all the Rubies in the Travis matrix (RBX, 1.9, 2.0, 2.1, and 2.2).
- Loading branch information
9cf94b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the weirdest commit message (and implementation) I can currently think of. It's a gift on a personal level. 🎁 Thank you.