aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorTarmo Tänav <tarmo@itech.ee>2008-10-30 18:45:30 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-10-30 17:48:32 +0100
commitef53d915164da7f757d03c4a70fe38e374c08b14 (patch)
treeb791ad2da09b90f4c7aaefcca46a192e7c0f325b /activesupport
parenta9e816843289d8839d4206c5ad09e49452d076ac (diff)
downloadrails-ef53d915164da7f757d03c4a70fe38e374c08b14.tar.gz
rails-ef53d915164da7f757d03c4a70fe38e374c08b14.tar.bz2
rails-ef53d915164da7f757d03c4a70fe38e374c08b14.zip
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>
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/string_inquirer.rb2
1 files changed, 1 insertions, 1 deletions
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