Actions
Feature #11429
openLocal variable assignment via regex ===
Status:
Open
Assignee:
-
Target version:
-
Description
Currently, this assigns the username
variable:
/(?<username>.*)@.*\..*/ =~ "seanlinsley@example.com"
But this does not:
/(?<username>.*)@.*\..*/ === "seanlinsley@example.com"
If it did, it would be possible to set variables during a case statement, which was my original goal:
case "seanlinsley@example.com"
when /(?<username>.*)@.*\..*/
puts "Username is: #{username}"
end
I would be happy to implement this, if it's a desired feature.
Actions
Like0
Like0Like0