Actions
Bug #21313
closed
`it` in rescue/ensure on prism
Description
1.times do
raise
rescue
p it
#=> prism: false
#=> parse.y: 0
end
it
should return 0, shouldn't it?
demo:
Same on ensure
.
1.times do
raise
ensure
p it #=> prism: false
#=> parse.y: 0
end
1.times do
begin
raise
ensure
p it #=> prism: false
#=> parse.y: 0
end
end
Updated by hsbt (Hiroshi SHIBATA) 4 months ago
- Status changed from Open to Assigned
Updated by nicholasdower (Nick Dower) 4 months ago
I encountered this issue today and attempted a fix: https://github.com/ruby/ruby/pull/13360
I hope that was appropriate.
Updated by mame (Yusuke Endoh) 4 months ago
- Status changed from Assigned to Closed
Updated by rwstauner (Randy Stauner) 1 day ago
I created a backport PR with this fix to 3.4 as https://github.com/ruby/ruby/pull/14573
Updated by rwstauner (Randy Stauner) 1 day ago
- Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: DONE
Updated by rwstauner (Randy Stauner) 1 day ago
- Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: DONE to 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED
Updated by k0kubun (Takashi Kokubun) 1 day ago
- Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED to 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: DONE
ruby_3_4 1f6d845011cf8900c0e9c6fe5e4243a63a5ecae3.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0