hirb-unicode fixes the problem that full-width unicode characters is aligned incorrectly.
In the original hirb unicode gem, the full-width character will be misaligned:
With hirb-unicode, the cells is correctly aligned:
gem install hirb-unicode
This will load hirb and hirb-unicode, and fix the unicode problem automtically:
gem 'hirb-unicode'
require 'hirb-unicode'
If you are using bundler (ex. Rails 3), add hirb-unicode into your gemfile:
gem 'hirb-unicode'
And run require 'hirb-unicode' in your irb console or .irbrc
hirb-unicode uses unicode-display_width gem to calculate width of unicode characters.
rake test:hirbloadshirbandhirb-unicode, run all test of originalhirbgem. This ensures the originalhirbfunctionality is not broken.rake test:unicodetests functions about unicode string processing.rake testrun both two tests above.
Read MIT-LICENSE file for details.

