diff --git a/activesupport/lib/active_support/string_inquirer.rb b/activesupport/lib/active_support/string_inquirer.rb index cd722a3cfb23b474b4c27a20ab2c1f8e76830505..e6b1f392251d726efce7fc4b19ef9fb4aca36d81 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