From f62fb985b6a7b90872148f0786219c9cc94c9356 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 1 Jul 2013 22:38:28 -0300 Subject: Remove deprecated `Proc#bind` with no replacement. --- activesupport/lib/active_support/core_ext/proc.rb | 17 ----------------- activesupport/lib/active_support/rescuable.rb | 1 - 2 files changed, 18 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/proc.rb (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/proc.rb b/activesupport/lib/active_support/core_ext/proc.rb deleted file mode 100644 index 166c3855a0..0000000000 --- a/activesupport/lib/active_support/core_ext/proc.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "active_support/core_ext/kernel/singleton_class" -require "active_support/deprecation" - -class Proc #:nodoc: - def bind(object) - ActiveSupport::Deprecation.warn 'Proc#bind is deprecated and will be removed in future versions' - - block, time = self, Time.now - object.class_eval do - method_name = "__bind_#{time.to_i}_#{time.usec}" - define_method(method_name, &block) - method = instance_method(method_name) - remove_method(method_name) - method - end.bind(object) - end -end diff --git a/activesupport/lib/active_support/rescuable.rb b/activesupport/lib/active_support/rescuable.rb index 9a038dfbca..a7eba91ac5 100644 --- a/activesupport/lib/active_support/rescuable.rb +++ b/activesupport/lib/active_support/rescuable.rb @@ -1,6 +1,5 @@ require 'active_support/concern' require 'active_support/core_ext/class/attribute' -require 'active_support/core_ext/proc' require 'active_support/core_ext/string/inflections' require 'active_support/core_ext/array/extract_options' -- cgit v1.2.3