`
reverocean
  • 浏览: 196152 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

Block

    博客分类:
  • Ruby
 
阅读更多
There are something about Block which need be noted.
First,if the parameters to a block are existing local variables,those variables will be used as the block parameters,and their values may be changed by the block's execution.
Second,the same thing applies to variables inside the block:if they appear for the first time in the block,they're local to the block.If instead they first appeared outside the block,the variables will be shared between the block and the surrounding environment.
分享到:
评论
Global site tag (gtag.js) - Google Analytics