提交 f64de36c 编写于 作者: A Akira Matsuda

Suppress Ruby warning: non-nil $, will be deprecated

上级 13e21025
...@@ -43,7 +43,9 @@ def setup ...@@ -43,7 +43,9 @@ def setup
joined = safe_join(["a", "b"]) joined = safe_join(["a", "b"])
assert_equal "ab", joined assert_equal "ab", joined
$, = "|" silence_warnings do
$, = "|"
end
joined = safe_join(["a", "b"]) joined = safe_join(["a", "b"])
assert_equal "a|b", joined assert_equal "a|b", joined
ensure ensure
...@@ -108,7 +110,9 @@ def setup ...@@ -108,7 +110,9 @@ def setup
test "to_sentence is not affected by $," do test "to_sentence is not affected by $," do
separator_was = $, separator_was = $,
$, = "|" silence_warnings do
$, = "|"
end
begin begin
assert_equal "one and two", to_sentence(["one", "two"]) assert_equal "one and two", to_sentence(["one", "two"])
assert_equal "one, two, and three", to_sentence(["one", "two", "three"]) assert_equal "one, two, and three", to_sentence(["one", "two", "three"])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册