1
0
Fork 0
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:
Maxime Chevalier-Boisvert 2022-05-02 16:30:05 -04:00 committed by GitHub
parent 5f20f4deee
commit 35e111fd3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-05-03 05:30:27 +09:00
Merged-By: maximecb <maximecb@ruby-lang.org>

View file

@ -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;
}