[#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@...>
With the change below, I have activated full Unicode case mapping for
4 messages
2016/05/31
[ruby-core:75450] [Ruby trunk Bug#12359] Named captures "conflict" warning is unnecessary and limits uses of named captures
From:
headius@...
Date:
2016-05-10 17:08:12 UTC
List:
ruby-core #75450
Issue #12359 has been updated by Charles Nutter. Related Ruby issue: https://bugs.ruby-lang.org/issues/9623 I think the warning needs to be softened to allow repeat use in literal regexp at the very least. ---------------------------------------- Bug #12359: Named captures "conflict" warning is unnecessary and limits uses of named captures https://bugs.ruby-lang.org/issues/12359#change-58569 * Author: Charles Nutter * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- There's currently a warning whenever a named capture in a regular expression has the same name as an already-declared local variable: ``` $ ruby23 -v -e 'x = 1; /(?<x>foo)/ =~ "foo"' ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14] -e:1: warning: named capture conflicts a local variable - x ``` It also warns if you have two expressions using the same named capture: ``` $ ruby23 -v -e '/(?<x>foo)/ =~ "foo"; /(?<x>foo)/ =~ "foo"' ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14] -e:1: warning: named capture conflicts a local variable - x ``` I do not believe either of these warnings are useful, since the only option for fixing them is to use a new variable name for every named capture. I have a few more reasons, as well: * Using the same named capture on both the "then" and "else" branches of an "if" statement will produce a warning. Changing one of the names requires additional work to join the to branches back together (since now there's no single variable resulting from them). * It is not possible to initialize a variable with the same name as a named capture. * The pattern that results from this warning is renaming a capture something like "name2" and then having "name = name2" after the match. Ugly. Risks of removing the warning: * When a named capture writes to an already-declared variable, that may surprise a user. I think this risk is very low, especially since you'd have to turn on verbose mode to even see the warning. -- 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>