_在ruby里是什么类型?
大家讲道理
大家讲道理 2017-04-21 10:56:13
0
1
583

小弟好奇_在ruby中是什么class,便做了个实验,打开irb,输入_.class返回的是NilClass,再输入一次_.class返回的就是Class了,这是为什么?

我的版本是irb 0.95,ruby 1.87

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
Ty80

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!