From ef53d915164da7f757d03c4a70fe38e374c08b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarmo=20T=C3=A4nav?= Date: Thu, 30 Oct 2008 18:45:30 +0200 Subject: [PATCH] Don't rely on string CoreExtensions in StringInquirer since it is sometimes expected to work before the core extension are loaded Signed-off-by: David Heinemeier Hansson --- activesupport/lib/active_support/string_inquirer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/string_inquirer.rb b/activesupport/lib/active_support/string_inquirer.rb index cd722a3cfb..e6b1f39225 100644 --- a/activesupport/lib/active_support/string_inquirer.rb +++ b/activesupport/lib/active_support/string_inquirer.rb @@ -11,7 +11,7 @@ module ActiveSupport # class StringInquirer < String def method_missing(method_name, *arguments) - if method_name.to_s.ends_with?("?") + if method_name.to_s[-1,1] == "?" self == method_name.to_s[0..-2] else super -- GitLab