Actions
Bug #16088
closed[patch] Call #to_binary on iseq containing pattern match crashes
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0dev (2019-08-06T18:13:17Z master 8877dbe400) [x86_64-darwin18]
Backport:
Description
Crasher: miniruby -e 'RubyVM::InstructionSequence.compile("case foo in []; end").to_binary'
It crashes since there is no handling for dumping TypeError
and NoMatchingPatternError
in the binary dumper.
Patch: https://github.com/ruby/ruby/pull/2325
Updated by alanwu (Alan Wu) over 5 years ago
- Status changed from Open to Closed
Applied in changeset git|050b932152fb3004c78af223186afe1aa397f06f.
Iseq#to_binary: Add support for NoMatchingPatternError and TypeError
Binary dumping the iseq for case foo in []; end
used to crash as
there was no handling for these exception classes.
Pattern matching generates these classes as operands to putobject
.
[Bug #16088]
Closes: https://github.com/ruby/ruby/pull/2325
Actions
Like0
Like0