Sha256: 1f812bcd44f5191afcb74a8830b4ad9835341cfb4bda8cfa42c2e4a08194b637

Contents?: true

Size: 257 Bytes

Versions: 75

Compression:

Stored size: 257 Bytes

Contents

class Module
  ###
  # TODO: remove this after 1.9 support is dropped
  def methods_transplantable? # :nodoc:
    x = Module.new { def foo; end }
    Module.new { define_method :bar, x.instance_method(:foo) }
    true
  rescue TypeError
    false
  end
end

Version data entries

75 entries across 71 versions & 8 rubygems

Version Path
activesupport-4.1.16 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.16.rc1 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.15 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.15.rc1 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.14.2 lib/active_support/core_ext/module/method_transplanting.rb
activejob-lock-0.0.2 rails/activesupport/lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.14.1 lib/active_support/core_ext/module/method_transplanting.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/core_ext/module/method_transplanting.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/core_ext/module/method_transplanting.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/core_ext/module/method_transplanting.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/core_ext/module/method_transplanting.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/core_ext/module/method_transplanting.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.14 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.14.rc2 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.14.rc1 lib/active_support/core_ext/module/method_transplanting.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.2.4 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.1.13 lib/active_support/core_ext/module/method_transplanting.rb
activesupport-4.2.4.rc1 lib/active_support/core_ext/module/method_transplanting.rb