我在mini_magick库中的makeTempname()中的image_temp_file.rb中看到了这个变量.
在$开始一个全局变量的引用.程序通常会定义类似$ name的内容,系统会预定义许多信息和控件引用.
特别是$$,是进程ID.
$name program-defined global variable
$! latest error message
$@ location of error
$_ string last read by gets
$. line number last read by interpreter
$& string last matched by regexp
$~ the last regexp match, as an array of subexpressions
$n the nth subexpression in the last match (same as $~[n])
$= case-insensitivity flag
$/ input record separator
$\ output record separator
$0 the name of the ruby script file
$* the command line arguments
$$ interpreter's process ID
$? exit status of last executed child process
| 归档时间: |
|
| 查看次数: |
275 次 |
| 最近记录: |