Is /etc/irbrc installed by OS X? Does irb read it?

主宰稳场 提交于 2019-12-01 18:02:53

Per Mark Setchell's and Jared Beck's comments, /etc/irbrc is installed with current (10.13) OS X and has been for at least a few major releases.

I copied /etc/irbrc to ~/.irbrc, ran irb, exited and got an error: undefined method 'nitems' for ["exit"]:Array (NoMethodError). This method existed in Ruby 1.8 but was removed from Ruby 1.9. I don't normally see this error, so I conclude that /etc/irbrc isn't executed at all.

Overall, I conclude that I can ignore /etc/irbrc when debugging issues with my ~/.irbrc, which was the origin of my question.

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