提交 ef53d915 编写于 作者: T Tarmo Tänav 提交者: David Heinemeier Hansson

Don't rely on string CoreExtensions in StringInquirer since it is sometimes...

Don't rely on string CoreExtensions in StringInquirer since it is sometimes expected to work before the core extension are loaded
Signed-off-by: NDavid Heinemeier Hansson <david@loudthinking.com>
上级 a9e81684
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册