aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/core_ext/object/instance_variables.rb7
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb7
2 files changed, 0 insertions, 14 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/instance_variables.rb b/activesupport/lib/active_support/core_ext/object/instance_variables.rb
index 4ecaab3bbb..866317b17a 100644
--- a/activesupport/lib/active_support/core_ext/object/instance_variables.rb
+++ b/activesupport/lib/active_support/core_ext/object/instance_variables.rb
@@ -1,11 +1,4 @@
class Object
- # Available in 1.8.6 and later.
- unless respond_to?(:instance_variable_defined?)
- def instance_variable_defined?(variable)
- instance_variables.include?(variable.to_s)
- end
- end
-
# Returns a hash that maps instance variable names without "@" to their
# corresponding values. Keys are strings both in Ruby 1.8 and 1.9.
#
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb
index f0121b862d..e6fbdb637b 100644
--- a/activesupport/test/core_ext/object_and_class_ext_test.rb
+++ b/activesupport/test/core_ext/object_and_class_ext_test.rb
@@ -182,13 +182,6 @@ class ObjectInstanceVariableTest < Test::Unit::TestCase
assert_equal %w(@bar @baz), @source.instance_variable_names.sort
end
- def test_instance_variable_defined
- assert @source.instance_variable_defined?('@bar')
- assert @source.instance_variable_defined?(:@bar)
- assert !@source.instance_variable_defined?(:@foo)
- assert !@source.instance_variable_defined?('@foo')
- end
-
def test_copy_instance_variables_from_without_explicit_excludes
assert_equal [], @dest.instance_variables
@dest.copy_instance_variables_from(@source)