aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/string_inquirer_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/string_inquirer_test.rb')
-rw-r--r--activesupport/test/string_inquirer_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/test/string_inquirer_test.rb b/activesupport/test/string_inquirer_test.rb
index 2a5e7d02e4..69d01fe26d 100644
--- a/activesupport/test/string_inquirer_test.rb
+++ b/activesupport/test/string_inquirer_test.rb
@@ -34,6 +34,11 @@ class StringInquirerTest < ActiveSupport::TestCase
assert_not_respond_to str, :nope
ensure
- String.send :undef_method, :respond_to_missing?
+ String.class_eval do
+ undef_method :respond_to_missing?
+ def respond_to_missing?(name, include_private = false)
+ (name == :bar) || super
+ end
+ end
end
end