tj / terminal-table

Ruby ASCII Table Generator, simple and feature rich.
MIT License
1.53k stars 121 forks source link

Use unicode-display_width without String ext #104

Closed dduugg closed 3 years ago

dduugg commented 5 years ago

Requires unicode-display_width without the String extensions . (A grep shows them to be unused by this library).

This option was introduced in the 1.0.0 release, so is fully compatible with the current >= 1.1.1 requirement.

This resolves issues where code can be unintentionally coupled to terminal-table by making use of these extensions, as well potentially conflicting with other libraries that may wish to extend String differently using the same method names.

dduugg commented 3 years ago

Thanks for the merge @nateberkopec !

Note that once v2.0 of unicode-display_width is released, this will no longer be necessary: https://github.com/janlelis/unicode-display_width/blob/bbfce64/lib/unicode/display_width/no_string_ext.rb