1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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 <david@loudthinking.com>
This commit is contained in:
Tarmo Tänav 2008-10-30 18:45:30 +02:00 committed by David Heinemeier Hansson
parent a9e8168432
commit ef53d91516

View file

@ -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