Browse files

Don't rely on string CoreExtensions in StringInquirer since it is som…

…etimes expected to work before the core extension are loaded

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
  • Loading branch information...
1 parent a9e8168 commit ef53d915164da7f757d03c4a70fe38e374c08b14 @tarmo tarmo committed with dhh Oct 30, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/string_inquirer.rb
View
2 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

0 comments on commit ef53d91

Please sign in to comment.