You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Old Rubies which might still work: **2.7**, **2.6**, **2.5**, **2.4**, **2.3**
10
-
11
-
For even older Rubies, use version 2.3.0 of this gem: **2.3**, **2.2**, **2.1**, **2.0**, **1.9**
12
-
13
7
## Version 2.4.2 — Performance Updates
14
8
15
9
**If you use this gem, you should really upgrade to 2.4.2 or newer. It's often 100x faster, sometimes even 1000x and more!**
16
10
17
11
This is possible because the gem now detects if you use very basic (and common) characters, like ASCII characters. Furthermore, the charachter width lookup code has been optimized, so even when full-width characters are involved, the gem is much faster now.
18
12
19
-
## Version 2.0 — Breaking Changes
20
-
21
-
Some features of this library were marked deprecated for a long time and have been removed with Version 2.0:
22
-
23
-
- Aliases of display_width (…\_size, …\_length) have been removed
24
-
- Auto-loading of string core extension has been removed:
25
-
26
-
If you are relying on the `String#display_width` string extension to be automatically loaded (old behavior), please load it explicitly now:
27
-
28
-
```ruby
29
-
require"unicode/display_width/string_ext"
30
-
```
31
-
32
-
You could also change your `Gemfile` line to achieve this:
Guessing the correct space a character will consume on terminals is not easy. There is no single standard. Most implementations combine data from [East Asian Width](https://www.unicode.org/reports/tr11/), some [General Categories](https://en.wikipedia.org/wiki/Unicode_character_property#General_Category), and hand-picked adjustments.
0 commit comments