mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
16 lines
304 B
Ruby
16 lines
304 B
Ruby
##
|
|
# Codegen tests
|
|
|
|
assert('peephole optimization does not eliminate move whose result is reused') do
|
|
assert_raise LocalJumpError do
|
|
def method
|
|
yield
|
|
end
|
|
method(&a &&= 0)
|
|
end
|
|
end
|
|
|
|
assert('empty condition in ternary expression parses correctly') do
|
|
assert_equal(() ? 1 : 2, 2)
|
|
end
|