From: "nobu (Nobuyoshi Nakada) via ruby-core" Date: 2024-03-12T04:47:38+00:00 Subject: [ruby-core:117107] [Ruby master Bug#20277] Remove stale `String` test conditionals Issue #20277 has been updated by nobu (Nobuyoshi Nakada). Description updated Assignee set to ko1 (Koichi Sasada) ---------------------------------------- Bug #20277: Remove stale `String` test conditionals https://bugs.ruby-lang.org/issues/20277#change-107182 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Assignee: ko1 (Koichi Sasada) * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I found three instance variables in `TestString` in test/ruby/test_string.rb. 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/