In ruby what does “$$” mean?

前端 未结 3 1242
一个人的身影
一个人的身影 2021-01-27 23:39

In my rails console:

$$
#=> 12680

in IRB in other tab:

$$
#=> 15550

What does $$ stands fo

3条回答
  •  被撕碎了的回忆
    2021-01-28 00:33

    I made a wild guess it was can be process it. I validated it with

    Process.pid
    #=> returns the same value as $$
    

    PS: if there's more to it, please care to add your answer or comment.

提交回复
热议问题