[#83096] File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?}) — Nobuyoshi Nakada <nobu@...>
On 2017/10/04 8:47, normal@ruby-lang.org wrote:
5 messages
2017/10/04
[#83100] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Eric Wong <normalperson@...>
2017/10/04
Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
[#83105] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Nobuyoshi Nakada <nobu@...>
2017/10/04
On 2017/10/04 15:55, Eric Wong wrote:
[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>
Hello,
9 messages
2017/10/04
[#83113] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/05
This has been requested countless times, then rejected each and every time.
[#83129] Re: Alias Enumerable#include? to Enumerable#includes?
— Alberto Almagro <albertoalmagro@...>
2017/10/05
Sorry I didn't found it on the core mail list's archive.
[#83138] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/06
Ruby has not been made of popular votes so far. You have to show us
[#83149] Re: Alias Enumerable#include? to Enumerable#includes?
— Eric Wong <normalperson@...>
2017/10/06
Alberto Almagro <albertoalmagro@gmail.com> wrote:
[#83200] [Ruby trunk Feature#13996] [PATCH] file.c: apply2files releases GVL — normalperson@...
Issue #13996 has been reported by normalperson (Eric Wong).
4 messages
2017/10/10
[ruby-core:83161] [Ruby trunk Bug#13921][Closed] buffered read_nonblock doesn't work as expected using SSLSocket
From:
k@...
Date:
2017-10-06 12:35:58 UTC
List:
ruby-core #83161
Issue #13921 has been updated by rhenium (Kazuki Yamaguchi).
Status changed from Open to Closed
chucke (Tiago Cardoso) wrote:
> rhenium, thank you for the link to the openssl issue, I just tested, and I can confirm that it solves the issue! Indeed I had problems with data left in the destination buffer passed as argument, as my example above shows.
>
> But I still have to keep my workaround for openssl < 2.0.6, as those versions won't go away anytime soon.
>
> But there should be a warning in the documentation for #read_nonblock saying that passing a buffer as argument is unsafe for ssl sockets.
Thanks for the confirmation. Backport request for Ruby 2.3 and 2.4 is [Bug #13935].
I suggest you check the return value from *#read_nonblock. It happens only in error cases where read_nonblock could not read anything.
----------------------------------------
Bug #13921: buffered read_nonblock doesn't work as expected using SSLSocket
https://bugs.ruby-lang.org/issues/13921#change-67097
* Author: chucke (Tiago Cardoso)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: 2.4.2
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
I have something similar to the following code that handles both tcp as well as ssl sockets. The idea is to use the #read_nonblock API which uses a buffer when passed in the argument (instead of creating a string every time).
```
class A
def initialize
@buffer = String.new("", encoding: Encoding::BINARY)
end
def read(io)
io.read_nonblock(16_384, @buffer, exception: false)
# do stuff...
@buffer.clear
end
```
For plain tcp sockets, it works as expected (buffers payload). However, when passed an ssl socket, it buffers the whole SSL payload, which SSLSocket's usually handle transparently. Of course, my logic fails after that.
My current workaround is to resort to the unbuffered API:
```
buffer = io.read_nonblock(16_384, exception: false)
```
however, the call mentioned above should have worked transparently.
--
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>