Project

General

Profile

Actions

Bug #20651

closed

`false && (1 in 1)` produces argument stack underflow (-1)

Added by tompng (tomoya ishida) 4 months ago. Updated 3 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux]
[ruby-core:118681]

Description

false && (1 in 1) and true || (1 in 1) produces argument stack underflow since ruby 3.0

# ruby -v
ruby 3.4.0dev (2024-07-24T19:55:04Z master 30eba40f9c) [x86_64-linux]
# ruby -e "false && (1 in 1)"
-- raw disasm--------
   trace: 1
   0000 putobject            false                                       (   1)
   0002 leave                                                            (   1)
 <L004> [sp: 1, unremovable: 1, refcnt: 1]
 <L002> [sp: 1, unremovable: 0, refcnt: 0]
   0003 pop                                                              (   1)
*  0004 pop                                                              (   1)
   0005 putobject            false                                       (   1)
   0007 leave                                                            (   1)
---------------------
-e:1: argument stack underflow (-1)
-e: compile error (SyntaxError)

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #20571: Compile error on for loopClosedActions
Actions #2

Updated by mame (Yusuke Endoh) 4 months ago

  • Is duplicate of Bug #20571: Compile error on for loop added
Actions #3

Updated by nobu (Nobuyoshi Nakada) 4 months ago

  • Status changed from Open to Closed
  • Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN to 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) 4 months ago

  • Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Backport changed from 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0