From: hanmac@... Date: 2018-05-11T10:20:13+00:00 Subject: [ruby-core:86993] [Ruby trunk Feature#14249] Remove str[match_str] Issue #14249 has been updated by Hanmac (Hans Mackowiak). I can tell you that the `str[match_str]` is used in many codes, but i can't find any example now and no, it is different from `str[regex]` ! ---------------------------------------- Feature #14249: Remove str[match_str] https://bugs.ruby-lang.org/issues/14249#change-71958 * Author: ana06 (Ana Maria Martinez Gomez) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I wonder if `str[match_str]` makes sense. ``` Ruby "ana"['a'] => "a" ``` I would say this is not expected and it brings problems, for example when accessing nested hashes. For example: ``` Ruby params = { "user" => "Nicolas Cage" } => {"user"=>"Nicolas Cage"} params["user"]["age"] => "age" ``` I think `str[regexp]` is enough and that `str[match_str]` can be removed. -- https://bugs.ruby-lang.org/ Unsubscribe: