lib/bindata/warnings.rb in bindata-2.4.15 vs lib/bindata/warnings.rb in bindata-2.5.0

- old
+ new

@@ -11,10 +11,10 @@ alias_method :initialize_without_warning, :initialize def initialize_with_warning(*args) owner = method(:initialize).owner if owner != BinData::Base msg = "Don't override #initialize on #{owner}." - if %w(BinData::Base BinData::BasePrimitive).include? self.class.superclass.name + if %w[BinData::Base BinData::BasePrimitive].include? self.class.superclass.name msg += "\nrename #initialize to #initialize_instance." end fail msg end initialize_without_warning(*args)