The readline
extension on my OSX seems buggy.
$irb -f --noreadline
irb(main):001:0> "中文"
=> "中文"
$irb -f --readline
irb(main):001:0> \U+FFE4\U+FFB8\U+FFAD\U+FFE6
So I want to set --noreadline
as default option for irb. how to do it?
p.s. I'm using RVM
and Ruby
1.9.3p194.
Add the following to your ~/.irbrc
file (create it if it doesn't exist):
IRB.conf[:USE_READLINE] = false
Alternatively, you can add this to /etc/irbrc
if you want it to apply across user accounts, or foo/.irbrc
if you want it to apply on a directory/project basis.
Here's a list of other useful config options.