[#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:83556] [Ruby trunk Bug#14051] net/imap issue on idle method with an empty block
From:
shugo@...
Date:
2017-10-25 04:41:32 UTC
List:
ruby-core #83556
Issue #14051 has been updated by shugo (Shugo Maeda).
simayosi (SHIMAYOSHI Takao) wrote:
> Description
> If Net::IMAP#idle method is called with empty block, all response handlers that have added beforehand are unintentionally removed before returning from the call.
>
> Sample Code
> imap.add_response_handler do |resp|
> if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS"
> imap.idle_done
> end
> end
> imap.idle {}
> # the response handler firstly added is unregistered here
I couldn't reproduce the problem with the following code:
```ruby
imap.add_response_handler do |resp|
if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS"
imap.idle_done
end
end
p imap.response_handlers #=> [#<Proc:0x0000560887b7b958@t.rb:8>]
imap.idle {}
p imap.response_handlers #=> [#<Proc:0x0000560887b7b958@t.rb:8>]
```
> Cause
> @response_handlers.delete(nil) is executed in Net::IMAP#remove_response_handler called from the idle method.
Even if the body of a block is empty, a block parameter cannot be nil.
```ruby
def foo(&b)
p b
end
foo {} #=> #<Proc:0x00005595c4e7f298@(irb):2>
```
And even if no block is given, a LocalJumpError will be raised.
```ruby
def idle(timeout = nil, &response_handler)
raise LocalJumpError, "no block given" unless response_handler
```
----------------------------------------
Bug #14051: net/imap issue on idle method with an empty block
https://bugs.ruby-lang.org/issues/14051#change-67583
* Author: simayosi (SHIMAYOSHI Takao)
* Status: Assigned
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
* Target version:
* ruby -v:
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Description
If Net::IMAP#idle method is called with empty block, all response handlers that have added beforehand are unintentionally removed before returning from the call.
Sample Code
imap.add_response_handler do |resp|
if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS"
imap.idle_done
end
end
imap.idle {}
# the response handler firstly added is unregistered here
Cause
@response_handlers.delete(nil) is executed in Net::IMAP#remove_response_handler called from the idle method.
--
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>