ITeye博客

ror零碎

yiyanwan77 · 2012-03-26 11:16 · ROR · 编程语言 · Markdown

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。