Sha256: 6e5ea79bba2dff358a2f8be4c24b797fd079bdaa5dab3bef4c1d46b8f14d9bba

Contents?: true

Size: 382 Bytes

Versions: 17

Compression:

Stored size: 382 Bytes

Contents

module Kernel
  unless (RUBY_VERSION[0,3] == '1.9')
    def instance_exec(*args, &block)
      mname = "__instance_exec_#{Thread.current.object_id.abs}_#{object_id.abs}"
      Object.class_eval{ define_method(mname, &block) }
      begin
        ret = send(mname, *args)
      ensure
        Object.class_eval{ undef_method(mname) } rescue nil
      end
      ret
    end
  end
end

Version data entries

17 entries across 16 versions & 3 rubygems

Version Path
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.9.1/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.8/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.12.2 lib/middleman/vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.12.1 lib/middleman/vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
ginst-2009.12.8 vendor/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.12.0.pre3 lib/middleman/vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.12.0.pre2 lib/middleman/vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.12.0.pre lib/middleman/vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
ginst-2009.11.24 vendor/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
ginst-2009.11.23 vendor/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.10.17 vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.10.16 vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.10.15 vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
middleman-0.10.14 vendor/gems/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
ginst-2.0.1 vendor/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
ginst-2.0.0 vendor/gems/templater-1.0.0/lib/templater/core_ext/kernel.rb
templater-1.0.0 lib/templater/core_ext/kernel.rb