зеркало из https://github.com/github/ruby.git
Add a test
This commit is contained in:
Родитель
fe746747b4
Коммит
a861c74813
|
@ -1727,6 +1727,11 @@ eom
|
||||||
assert_valid_syntax("tap {a = (break unless true)}")
|
assert_valid_syntax("tap {a = (break unless true)}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_value_expr_in_singleton
|
||||||
|
mesg = /void value expression/
|
||||||
|
assert_syntax_error("class << (return); end", mesg)
|
||||||
|
end
|
||||||
|
|
||||||
def test_tautological_condition
|
def test_tautological_condition
|
||||||
assert_valid_syntax("def f() return if false and invalid; nil end")
|
assert_valid_syntax("def f() return if false and invalid; nil end")
|
||||||
assert_valid_syntax("def f() return unless true or invalid; nil end")
|
assert_valid_syntax("def f() return unless true or invalid; nil end")
|
||||||
|
|
Загрузка…
Ссылка в новой задаче