lib/bindata/delayed_io.rb in bindata-2.4.14 vs lib/bindata/delayed_io.rb in bindata-2.4.15
- old
+ new
@@ -157,12 +157,13 @@
class Base
class << self
# The +auto_call_delayed_io+ keyword sets a data object tree to perform
# multi pass I/O automatically.
def auto_call_delayed_io
+ include AutoCallDelayedIO
+
return if DelayedIO.method_defined? :initialize_instance_without_record_io
- include AutoCallDelayedIO
DelayedIO.send(:alias_method, :initialize_instance_without_record_io, :initialize_instance)
DelayedIO.send(:define_method, :initialize_instance) do
if @parent && !defined? @delayed_io_recorded
@delayed_io_recorded = true
list = top_level_get(:delayed_ios)