[#75687] [Ruby trunk Bug#12416] struct rb_id_table lacks mark function — shyouhei@...
Issue #12416 has been reported by Shyouhei Urabe.
3 messages
2016/05/23
[#75763] [Ruby trunk Feature#12435] Using connect_nonblock to open TCP connections in Net::HTTP#connect — mohamed.m.m.hafez@...
Issue #12435 has been reported by Mohamed Hafez.
3 messages
2016/05/28
[#75774] Errno::EAGAIN thrown by OpenSSL::SSL::SSLSocket#connect_nonblock — Mohamed Hafez <mohamed.m.m.hafez@...>
Hi all, every now and then in my production server, I'm
4 messages
2016/05/30
[#75775] Re: Errno::EAGAIN thrown by OpenSSL::SSL::SSLSocket#connect_nonblock
— Mohamed Hafez <mohamed.m.m.hafez@...>
2016/05/30
Or does MRI's OpenSSL::SSL::SSLSocket#connect_nonblock just return
[#75782] Important: Somewhat backwards-incompatible change (Fwd: [ruby-cvs:62388] duerst:r55225 (trunk): * string.c: Activate full Unicode case mapping for UTF-8) — Martin J. Dürst <duerst@...>
V2l0aCB0aGUgY2hhbmdlIGJlbG93LCBJIGhhdmUgYWN0aXZhdGVkIGZ1bGwgVW5pY29kZSBjYXNl
4 messages
2016/05/31
[ruby-core:75320] [Ruby trunk Feature#12333] `String#concat`, `Array#concat`, `String#prepend` to take multiple arguments
From:
sawadatsuyoshi@...
Date:
2016-05-03 08:23:45 UTC
List:
ruby-core #75320
Issue #12333 has been updated by Tsuyoshi Sawada.
Satoru, thank you for the patch.
And you are making good points with the questions you raised.
> * What is the appropriate behavior when calling concat/prepend without argument?
> * The code attached now returns just self
I agree with this behavior. I think this would be the most natural.
> * What should happen when writing ar.concat(ar, ar)?
> * ar = [1]; ar.concat(ar, ar) #=> [1,1,1]? or [1,1,1,1]?
> * ar << ar << ar returns [1,1,1,1], of course because this is just a sequence of binary operations
This is more logical (in some sense), but counter-intuitive.
> * However, I feel "ar.concat(ar, ar)" saying "append present content of the array twice to the array", meaning [1,1,1]
This is more intuitive, but may be less logical.
I have preference with the second option, but am not completely sure. Maybe other people might have different opinions.
----------------------------------------
Feature #12333: `String#concat`, `Array#concat`, `String#prepend` to take multiple arguments
https://bugs.ruby-lang.org/issues/12333#change-58448
* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
I would like `String#concat`, `Array#concat`, `String#prepend` to take multiple arguments
~~~ruby
s = ""
s.concat("a", "b", "c")
a.prepend("A", "B", "C")
s # => "ABCabc"
a = []
a.concat(["a"], ["b", "c"])
a # => ["a", "b", "c"]
~~~
---Files--------------------------------
multi_concat_prepend.patch (2.94 KB)
fixed_multi_concat_prepend.patch (3.14 KB)
--
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>