Sha256: a3f6c917a4046252ec3c2a02b7bb950bfe6db4f3a73352ce1987263956834f45
Contents?: true
Size: 1015 Bytes
Versions: 1
Compression:
Stored size: 1015 Bytes
Contents
#encoding: UTF-8 module MPatch Dir.glob(File.join(File.absolute_path(File.dirname(__FILE__)),"mpatch","**","*.{rb,ru}")).each{|e|require e} [ MPatch::Module, MPatch::Class ].each do |module_name| module_name.__send__ :include, MPatch::ClassAndModule end [ MPatch::Module, MPatch::Class, MPatch::String, MPatch::Proc, MPatch::Object, MPatch::Array, MPatch::Integer, MPatch::Hash ].each do |module_name| constant= ::Object name= module_name.to_s.split('::').last constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name) constant.__send__ :include, module_name end [ MPatch::Process, MPatch::Random, MPatch::YAML ].each do |module_name| constant= ::Object name= module_name.to_s.split('::').last constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name) constant.__send__ :extend, module_name end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mpatch-2.2.1 | lib/mpatch.rb |