[#97086] [Ruby master Bug#16612] Enumerator::ArithmeticSequence#last with float range produces incorrect value — muraken@...
Issue #16612 has been updated by mrkn (Kenta Murata).
4 messages
2020/02/07
[#97307] [Ruby master Feature#16663] Add block or filtered forms of Kernel#caller to allow early bail-out — headius@...
Issue #16663 has been reported by headius (Charles Nutter).
29 messages
2020/02/28
[ruby-core:97316] [Ruby master Feature#16666] 'string' - 'str' as a shortcut for 'string'.gsub('str', '')?
From:
vladimir.pisanov@...
Date:
2020-02-29 21:12:58 UTC
List:
ruby-core #97316
Issue #16666 has been reported by vladpisanov (Vlad Pisanov).
----------------------------------------
Feature #16666: 'string' - 'str' as a shortcut for 'string'.gsub('str', '')?
https://bugs.ruby-lang.org/issues/16666
* Author: vladpisanov (Vlad Pisanov)
* Status: Open
* Priority: Normal
----------------------------------------
Sorry if this has been brought up before, but I couldn't find anything.
I love how we can substract arrays (`[1,2,3] - [1,2]`). Does anyone else think the same syntax would be beneficial for Strings?
Some possible scenarios could be:
```ruby
'string' - 'str' # Remove substring
'string' - ['s', 't'] # Remove a set of characters
'string' - /^st/ # Remove by regexp
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>