Ignore method conflicts in bit-struct
git-svn-id: file:///home/svn/framework3/trunk@6862 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
54fc8e70e2
commit
885f82e760
|
@ -146,14 +146,15 @@ class BitStruct < String
|
|||
if fields.find {|f|f.name == name}
|
||||
raise FieldNameError, "Field #{name} is already defined as a field."
|
||||
end
|
||||
|
||||
=begin
|
||||
if instance_methods(true).find {|m| m == name}
|
||||
if opts[:allow_method_conflict] || opts["allow_method_conflict"]
|
||||
warn "Field #{name} is already defined as a method."
|
||||
else
|
||||
raise FieldNameError,"Field #{name} is already defined as a method."
|
||||
raise FieldNameError,"Field #{name} is already defined as a method. #{caller}"
|
||||
end
|
||||
end
|
||||
=end
|
||||
|
||||
field_class = opts[:field_class]
|
||||
|
||||
|
|
Loading…
Reference in New Issue