[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/

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/

Issue #20277 has been updated by ko1 (Koichi Sasada). +1 ---------------------------------------- Bug #20277: Remove stale `String` test conditionals https://bugs.ruby-lang.org/issues/20277#change-107186 * 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/
participants (2)
-
ko1 (Koichi Sasada)
-
nobu (Nobuyoshi Nakada)