[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84551] [Ruby trunk Feature#14022] String#surround
From:
shevegen@...
Date:
2017-12-28 22:45:18 UTC
List:
ruby-core #84551
Issue #14022 has been updated by shevegen (Robert A. Heiler).
> But for this really frequent case surround() still feels more elegant.
Agreed. It is not so frequent for my case, to be honest; but I like
the use case that sawa described since that is similar to ones I
experienced too, in regards to filenames (you know, file names which
may have empty spaces or ' characters and similar, but no " character).
"(#{variable})" works just fine or even '"'+filename+'"' :D but
string.surround('"') may feel more elegant (or perhaps .pad() but
I guess the name .pad() may be semi-reserved or refer to whitespace ...
.surround() seems less problematic)
The wiki lists that it was discussed or mentioned in a developer meeting
in late November 2017:
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20171129Japan
Not sure if anything has been decided - some meetings seem to have LOTS
of issues, I wonder if the japanese devs can discuss all of these in
less than 4 hours. :)
Perhaps it could be brought up again in 2018 at the next developer
meeting, if time allows?
----------------------------------------
Feature #14022: String#surround
https://bugs.ruby-lang.org/issues/14022#change-69087
* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
After joining the elements of an array into a string using `Array#join`, I frequently need to put substrings before and after the string. In such case, I would have to use either of the following:
```ruby
[1, 2, 3].join(", ").prepend("<").concat(">") # => "<1, 2, 3>"
"<#{[1, 2, 3].join(", ")}>" # => "<1, 2, 3>"
"<" + [1, 2, 3].join(", ") + ">" # => "<1, 2, 3>"
```
but none of them is concise enough. I wish there were `String#surround` that works like this:
```ruby
[1, 2, 3].join(", ").surround("<", ">") # => "<1, 2, 3>"
```
--
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>