小弟好奇_在ruby中是什么class,便做了个实验,打开irb,输入_.class返回的是NilClass,再输入一次_.class返回的就是Class了,这是为什么?
我的版本是irb 0.95,ruby 1.87
PHP中文网2017-04-21 10:58:13
After testing, I found that "_" should save the content of the last standard output of irb. Of course, since it is standard output, it does not include exception information.