mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix bug identified by @noahgibbs. (#5876)
Turned out to be a one-character fix :)
This commit is contained in:
parent
5f20f4deee
commit
35e111fd3e
Notes:
git
2022-05-03 05:30:27 +09:00
Merged-By: maximecb <maximecb@ruby-lang.org>
1 changed files with 4 additions and 1 deletions
|
@ -2251,16 +2251,19 @@ fn guard_two_fixnums(ctx: &mut Context, cb: &mut CodeBlock, side_exit: CodePtr)
|
|||
let arg0_type = ctx.get_opnd_type(StackOpnd(1));
|
||||
|
||||
if arg0_type.is_heap() || arg1_type.is_heap() {
|
||||
add_comment(cb, "arg is heap object");
|
||||
jmp_ptr(cb, side_exit);
|
||||
return;
|
||||
}
|
||||
|
||||
if arg0_type != Type::Fixnum && arg0_type.is_specific() {
|
||||
add_comment(cb, "arg0 not fixnum");
|
||||
jmp_ptr(cb, side_exit);
|
||||
return;
|
||||
}
|
||||
|
||||
if arg1_type != Type::Fixnum && arg0_type.is_specific() {
|
||||
if arg1_type != Type::Fixnum && arg1_type.is_specific() {
|
||||
add_comment(cb, "arg1 not fixnum");
|
||||
jmp_ptr(cb, side_exit);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue