`
yiyanwan77
  • 浏览: 182577 次
  • 性别: Icon_minigender_1
  • 来自: 威海
社区版块
存档分类
最新评论

ror零碎

    博客分类:
  • ROR
 
阅读更多

instance_of?  父类为false

is_a? 父类为true

 

-----

taint 

o ={:name=>"china"}
o.taint
o1={:subName=>"c"}

o11={:subSubName=>"c11"}

o1[:sub]=o11

o[:sub]=o1

oo=o.dup


p o[:sub].tainted? #false
p oo.tainted?        #true
 

 

str1="str"


str2=str1.dup

str1.taint

p   str2.tainted? #false
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics