mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Don't generate code for NODE_NEGATE if the result isn't used
Reported by https://hackerone.com/haquaman
This commit is contained in:
@@ -63,3 +63,13 @@ assert('splat in case splat') do
|
||||
|
||||
assert_equal [1], a
|
||||
end
|
||||
|
||||
assert('negate literal register alignment') do
|
||||
a = *case
|
||||
when 0
|
||||
-0.0
|
||||
2
|
||||
end
|
||||
|
||||
assert_equal [2], a
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user