提交 adcc5e11 编写于 作者: E Emilio Tagua

@selected may not be defined here, avoid warning.

上级 8ee27afd
......@@ -197,7 +197,7 @@ def assert_select(*args, &block)
# This usually happens when passing a node/element that
# happens to be nil.
raise ArgumentError, "First argument is either selector or element to select, but nil found. Perhaps you called assert_select with an element that does not exist?"
elsif @selected
elsif defined?(@selected) && @selected
root = HTML::Node.new(nil)
root.children.concat @selected
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册