Sha256: 50bd8b83ab71f5a3efc28b5a222dbef1e0ab65625da2009eb23889c10f38a2cd

Contents?: true

Size: 508 Bytes

Versions: 7

Compression:

Stored size: 508 Bytes

Contents

#
# Patch to ignore `require "dxopal"`
#

# TODO: why this does not work?
#module DXOpal
#  module PatchRequire
#    def require(*args)
#      if args == ['dxopal']
#        # Do nothing
#      else
#        super
#      end
#    end
#  end
#
#  Kernel.prepend(PatchRequire)
#end

module Kernel
  alias dxopal_orig_require require
end

def require(*args)
  if args == ['dxopal']
    # Do nothing, because DXOpal is already loaded and you don't need to find it
  else
    dxopal_orig_require(*args)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dxopal-1.6.0 lib/dxopal/patches/require_dxopal.rb
dxopal-1.5.2 lib/dxopal/patches/require_dxopal.rb
dxopal-1.5.1 lib/dxopal/patches/require_dxopal.rb
dxopal-1.5.0 lib/dxopal/patches/require_dxopal.rb
dxopal-1.4.4 lib/dxopal/patches/require_dxopal.rb
dxopal-1.4.3 lib/dxopal/patches/require_dxopal.rb
dxopal-1.4.2 lib/dxopal/patches/require_dxopal.rb