IRB escapes UTF characters

梦想与她 提交于 2019-12-07 04:28:27
spickermann

You can enable unicode support in IRB by recompiling Ruby against readline (instead of libedit which would be the default).

First install readline for example with brew:

brew install readline

I use rbenv to manage Ruby versions and use the following line to install Ruby versions:

RUBY_CONFIGURE_OPTS=--with-readline-dir="$(brew --prefix readline)" rbenv install 2.3.1

With rvm it will look like:

rvm install 2.3.1 --with-readline-dir=$rvm_path/usr

Or when you might want to recompile Ruby from source, then this answer might help you.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!