lib/bindata/warnings.rb in bindata-2.3.3 vs lib/bindata/warnings.rb in bindata-2.3.4

- old
+ new

@@ -1,8 +1,7 @@ module BinData class Base - # Don't override initialize. If you are defining a new kind of datatype # (list, array, choice etc) then put your initialization code in # #initialize_instance. BinData objects might be initialized as prototypes # and your initialization code may not be called. # @@ -19,14 +18,19 @@ end fail msg end initialize_without_warning(*args) end - alias_method :initialize, :initialize_with_warning + alias initialize initialize_with_warning def initialize_instance(*args) unless args.empty? fail "#{caller[0]} remove the call to super in #initialize_instance" end end + end + + class Struct + # has_key? is deprecated + alias has_key? key? end end