[#119637] Behavior of raising from rescue blocks when multiple rescue blocks exist — Rodrigo Rosenfeld Rosas via ruby-core <ruby-core@...>
Hello, I couldn't find any documentation about the subject, so I thought
3 messages
2024/10/29
[ruby-core:119613] [Ruby master Misc#20814] iseq optimizations on constant condition
From:
"hurricup (Alexandr Evstigneev) via ruby-core" <ruby-core@...>
Date:
2024-10-25 11:20:55 UTC
List:
ruby-core #119613
Issue #20814 has been reported by hurricup (Alexandr Evstigneev).
----------------------------------------
Misc #20814: iseq optimizations on constant condition
https://bugs.ruby-lang.org/issues/20814
* Author: hurricup (Alexandr Evstigneev)
* Status: Open
----------------------------------------
ruby 3.4-preview2 seems optimizes out some stuff when building iseq and this may lead to user unexpected behavior when debugging, because some lines just optimized out.
Example:
```
def foo1
if true
nil
else
1
end
end
```
produces:
```
== disasm: #<ISeq:foo1@/test.rb:1 (1,0)-(7,3)>
0000 putnil ( 3)[LiCa]
0001 leave ( 7)[Re]
```
Two questions:
- is there way to disable such optimizations?
- are there some specs on things that can be optimized.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/