From: "nobu (Nobuyoshi Nakada) via ruby-core" Date: 2024-02-18T11:18:45+00:00 Subject: [ruby-core:116829] [Ruby master Bug#20277] Remove stale `String` test conditionals Issue #20277 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #20277: Remove stale `String` test conditionals https://bugs.ruby-lang.org/issues/20277 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I found three instance variables in `TestString`. These select assertions: + `@aref_re_nth = true` Enables `String#[regexp, index]` assertions. + `@aref_re_silent = false` Assignment to unmatched region silently fails, if true. + `@aref_slicebang_silent = true` Out of range argument to `String#slice!` returns `nil`, not raising an exception. These instance variables for conditional execution have remained unchanged for nearly twenty years, since YARV merger. It is questionable whether these behaviors can be changed anymore. So I propose to remove these conditionals. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/