Project

General

Profile

Actions

Feature #14249

open

Remove str[match_str]

Added by ana06 (Ana Maria Martinez Gomez) over 6 years ago. Updated almost 6 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:84514]

Description

I wonder if str[match_str] makes sense.

"ana"['a'] => "a"

I would say this is not expected and it brings problems, for example when accessing nested hashes. For example:

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0